SpringBoot integrates spring-data-jpa: introduction, examples, API testing with postman

1)        Introduction to spring-data-jpa

2)        Example Step 1 : Create a project, pay attention to check the required components to complete the project creation
 

3)        Example Step 2 : Configure the mysql data source and jpa in the application.properties file ( just create a database, not a table )

4)        Example Step 3 : Create Entity Class

5)        Example Step 4 : Create a dao layer interface: all operations on the table can be implemented by inheriting only a JpaRepository interface

6)        Example Step 5 : Create a controller : directly inject the dao layer interface
 

7)        Example Step 6 : Test the API of the controller with postman

8)        Example Step 7 : Project Structure

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325390674&siteId=291194637