Spring boot operates the configuration added by MySQL pom

 

  1 Add dependencies to the pom.xml configuration file in the project

<!--MySQL依赖 -->
<dependency>
    <groupId>mysql</groupId>
    <artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>

<!--JPA依赖 -->
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-jpa</artifactId>

</dependency>

<!-- The following dependencies need to be imported to use @Entity annotation, @Id annotation --> 
< dependency > 
    < groupId > javax.persistence </ groupId > 
    < artifactId > persistence-api </ artifactId > 
    < version > 1.0.2 < ersion > 
</ dependency >

 

Guess you like

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