spring boot 操作MySQL pom添加的配置

  1 在项目中的pom.xml配置文件添加依赖

<!--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> <!--需要导入下列依赖,才能使用@Entity注解,@Id注解 -->
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
<version>1.0.2<ersion>
</dependency>
上一篇:HTML5 总结-画布-4


下一篇:BUAA软工-结对项目作业