mvn clean compile test
mvn package
mvn spring-boot:run
- Option 1 : Use java -jar
- Option 2 : Use Spring Boot Maven plugin
mvnw spring-boot:run
ormvn spring-boot:run
- Use EntityManager but leverage native Hibernate API
- Use EntityManager and standard JPA API
- Spring Data JPA
Spring Data REST Documentation
if we want to expose a different resource name? instead of "/employees" (or default) to use "/members" (customized) so path will be http://localhost:8080/members
- Default page size is 20
- Pages are zero index based
- To navigate page
- Properties
- spring.data.rest.default-page-size=50
- spring.data.rest.max-page-size=
- spring.data.rest.base-path=/magic-api
Here, http://localhost:8080/magic-api will be default base path
In Employee,we have firstName, lastName and email
- http://localhost:8080/employees/?sort=lastName
- http://localhost:8080/employees/?sort=firstName,desc
- http://localhost:8080/employees/?sort=lastName,firstName,asc
- http://localhost:8080/magic-api/employees?sort=firstName,desc&page=3