Spring Boot include ID field in json
Clash Royale CLAN TAG #URR8PPP Spring Boot include ID field in json Propably it's very simple but everything what I found is related to Spring Data Rest. I'm using "spring-boot-starter-web" and I can't found any solution... Here is my entity clas: @Entity @Table(name = "buses") class Bus( @Id @JsonProperty("sideNumber") @JsonInclude private val sideNumber: Int, @NotBlank var longitude: Double, @NotBlank var latitude: Double ) I tried to annotate sideNumber(Id) property with @JsonInclude and @Jsonproperty but with no luck. In my json reponse I only get longitude and latitude... My controller looks like that. @RestController @RequestMapping("/api") class BusController { @Autowired private lateinit var busRepository: BusRepository @GetMapping("/buses") fun getAllBuses(): List<Bus> { return busRepository.findAll() } @PostMapping("/buses") fun cre...