今天給大家介紹一下如何SpringBoot中連接Mysql數(shù)據(jù)庫,并使用JPA進(jìn)行數(shù)據(jù)庫的相關(guān)操作。
步驟一:在pom.xml文件中添加MYSQl和JPA的相關(guān)Jar包依賴,具體添加位置在dependencies中,具體添加的內(nèi)容如下所示。
org.springframework.boot spring-boot-starter-web org.springframework.boot spring-boot-starter-data-jpa mysql mysql-connector-java org.apache.poi poi 3.11