skip to Main Content

Mysql – Springboot not creating database tables

i created my entity in springboot import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.GenerationType; import jakarta.persistence.Table; @Table(name="users") @Entity public class User { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private String username; private String email; } i setted the database configuration in…

VIEW QUESTION

Spring Boot controller to handle invalid JSON

I have a Spring Boot controller that consumes JSON: @PostMapping( value = "/shipdetails") public ResponseEntity acceptShip(@RequestBody Ship ship, HttpServletRequest request) { shipService.checkShip(ship); return new ResponseEntity<>(HttpStatus.OK); } There is a corresponding Ship Entity: public class Ship implements Serializable { @JsonProperty("Name") private…

VIEW QUESTION
Back To Top
Search