David Ginzberg 9b74aa2561 Create README.md | 7 lat temu | |
---|---|---|
.mvn/wrapper | 7 lat temu | |
src | 7 lat temu | |
.gitignore | 7 lat temu | |
README.md | 7 lat temu | |
mvnw | 7 lat temu | |
mvnw.cmd | 7 lat temu | |
pom.xml | 7 lat temu |
This repository provides a starter project for a CRUD application using Spring Boot, RestControllers, and H2 for an in memory database.
Using this project as a starter, create a Person class as an entity to persist to H2 with an autogenerated id. Provide a RestController for Person with endpoints for HTTP GET, PUT, POST, and DELETE operations mapping to their appropriate CRUD behaviors. endpoints should be at /person
and /person/{id}
as appropriate. See the snippet below for setting Person IDs:
@Entity
public class Person {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Integer id;
...
}