pom.xml 支持jkbc:
org.springframework.boot
spring-boot-starter-jdbc
Oracle:
pom.xml:
com.oracle
ojdbc6
12.1.0.1-atlassian-hosted
application.properties:
spring.datasource.url=jdbc:oracle:thin:@localhost:1521:orcl
spring.datasource.username=userstudy
spring.datasource.password=userstudy
spring.datasource.driver-class-name=oracle.jdbc.driver.OracleDriver
MySql:
pom.xml:
mysql
mysql-connector-java
5.1.21
application.properties:
spring.datasource.url=jdbc:mysql://localhost:3306/test
spring.datasource.username=dbuser
spring.datasource.password=dbpass
spring.datasource.driver-class-name=com.mysql.jdbc.Driver