1. 程式人生 > >SpringBoot:Oracle 11g資料庫與Oracle 12c資料庫配置資料來源的區別

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