David Ginzberg 96565817d1 Pull in readme commit from 'master' of github.com:Zipcoder/CRUDApplication | 7 gadus atpakaļ | |
---|---|---|
.mvn/wrapper | 7 gadus atpakaļ | |
src | 7 gadus atpakaļ | |
.gitignore | 7 gadus atpakaļ | |
README.md | 7 gadus atpakaļ | |
mvnw | 7 gadus atpakaļ | |
mvnw.cmd | 7 gadus atpakaļ | |
pom.xml | 7 gadus atpakaļ |
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;
...
}