Simple configuration application of spring boot connect to Oracle

server.port = 8090 // Tomcat port services 
spring.datasource.driver-class-name = oracle.jdbc.driver.OracleDriver // Oracle driver
spring.datasource.url = jdbc: oracle: thin: @localhost: 1521: orcl // jdbc connect the Oracle
spring.datasource.username = hai // username
spring.datasource.password = 123123 // password


pom which also requires two notes
<-! oracle jdbc and corresponding version number ->
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc8</artifactId>
<version>11.2.0.4.0</version>
</dependency>

<!--报错不支持字符集用这个-->
<!-- https://mvnrepository.com/artifact/cn.easyproject/orai18n -->
<dependency>
<groupId>cn.easyproject</groupId>
<artifactId>orai18n</artifactId>
<version>12.1.0.2.0</version>
</dependency>

Guess you like

Origin www.cnblogs.com/shxkey/p/11833030.html