Loading tutorials
@RestController handles a @PostMapping, and what JSON request and response bodies look like. You don't need to know records or Bean Validation yet. Later chapters cove3 min read@RestController. It covers the record syntax and the members the compiler generates. Later chapters cover JSON binding, validation, and mapping.3 min read@RestController, and know how JSON request and response bodies work. Jackson is the JSON library that Spring Boot uses by default. It comes with spring-boot-starter-web, so you need no extra dependency.3 min read@RestController, and understand JSON request and response bodies. It also assumes Java 17 or later. It covers how records fit into a controller: one record for input, one for output, and a service that connects them.2 min read@RestController with @PostMapping, and have seen records used as request and response DTOs. You need Jav3 min read@RestController, and have seen @Valid with Bean Validation annotations. It covers the compact canonical constructor: what it does, what to put in it, and what to leave to Bean Validation.3 min read@RestController, and have seen records and Bean Validation in earlier chapters. Here you will turn a JPA entity into a response record, and you will see where that mapping belongs.2 min readUser. It also assumes you read the earlier chapter on mapping entities to response records. Here you skip the entity-to-record copy and have the repository return records directly.3 min read@RestController, you know what a Java record is, and you have seen Jackson turn a record into JSON and back. Here you control the JSON field names and contents without changing the record's component names.2 min readspring-boot-starter-test on the test classpath.3 min read