创新互联www.cdcxhl.cn八线动态BGP香港云服务器提供商,新人活动买多久送多久,划算不套路!
本篇文章为大家展示了SpringBoot如何连接并操作Mysql 数据库,内容简明扼要并且容易理解,绝对能使你眼前一亮,通过这篇文章的详细介绍希望你能有所收获。
本文默认你的开发环境.数据库已经安装好
想用使用数据库.我们需要现在pom文件中添加相应的依赖
pom.xml
<?xml version="1.0" encoding="UTF-8"?>4.0.0 com.imgod testjpa 0.0.1-SNAPSHOT war TestJpa Demo project for Spring Boot org.springframework.boot spring-boot-starter-parent 1.4.2.RELEASE UTF-8 UTF-8 1.8 org.springframework.boot spring-boot-starter-data-jpa org.springframework.boot spring-boot-starter-web org.springframework.boot spring-boot-starter-tomcat provided org.springframework.boot spring-boot-starter-test test mysql mysql-connector-java org.springframework.boot spring-boot-starter-jdbc org.hibernate hibernate-core org.springframework.boot spring-boot-maven-plugin