spring boot 操作MySQL pom添加的配置
阿新 • • 發佈:2018-05-06
version pri nec style -c 1.0 work ng- jdb
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>
spring boot 操作MySQL pom添加的配置