使用application.yml配置
oracle 11g数据源
oracle:
driver-class-name: oracle.jdbc.driver.OracleDriver
url: jdbc:oracle:thin:@:localhost:1521:test
username: test
password: test
max-active: 10
max-idle: 5
min-idle: 2
initial-size: 6
oracle 12c数据源
oracle:
driver-class-name: oracle.jdbc.driver.OracleDriver
url: jdbc:oracle:thin:@//localhost:1521/test
username: test
password: test
max-active: 10
max-idle: 5
min-idle: 2
initial-size: 6
区别:url中@符号后面11g用冒号(:),12c用斜杠(/)
不知道具体原因,希望大神告知!