SpringBoot:Oracle 11g数据库与Oracle 12c数据库配置数据源的区别

使用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用斜杠(/)


--------------------- 
作者:guduershi 
来源:CSDN 
原文:https://blog.csdn.net/guduershi/article/details/81297066 

猜你喜欢

转载自blog.csdn.net/weixin_39895109/article/details/83897747