Learn Spring Boot 1
Spring initialization
- spring-boot-starter-web
- spring-boot-starter-data-jpa
- spring-boot-devtools
- mysql-connector-java
- lombok
Connect to database
in the resource/application.properties
, we can config the hibernate connection for mysql
1 | spring.jpa.hibernate.ddl-auto=create-drop |
Simple API
To build a simple api, we need to add two annotaion to the main
- RestController
- @GetMapping/@PostMapping/ others
1 |
|
Learn Spring Boot 1