多数据源配置没有生效啊

提问 未结 3 61
深海
深海 2020-05-19
悬赏:20积分
版本: 开发环境:IDEA
配置多数据源引入项目不好使 spring: datasource: druid: driver-class-name: oracle.jdbc.OracleDriver url: jdbc:oracle:thin:@192.168.0.223:51521/helowinXDB username: WT_GONGWEN_HUIZHENG password: salis initial-size: 10 max-active: 100 min-idle: 10 max-wait: 6000 pool-prepared-statements: true max-pool-prepared-statement-per-connection-size: 20 time-between-eviction-runs-millis: 60000 min-evictable-idle-time-millis: 300000 #Oracle需要打开注释 validation-query: SELECT 1 FROM DUAL test-while-idle: true test-on-borrow: false test-on-return: false stat-view-servlet: enabled: true url-pattern: /druid/* filter: stat: log-slow-sql: true slow-sql-millis: 1000 merge-sql: false wall: config: multi-statement-allow: true ##多数据源的配置,需要引用renren-dynamic-datasource dynamic: datasource: slave1: driver-class-name: oracle.jdbc.driver.OracleDriver url: jdbc:oracle:thin:@//192.168.0.223:51521/helowinXDB username: WT_YSJ_BAS password: salis slave2: driver-class-name: oracle.jdbc.driver.OracleDriver url: jdbc:oracle:thin:@//192.168.0.223:51521/helowinXDB username: WT_BDCBM_BASE password: salis
回帖
  • 不支持方法继承
    0 回复
  • 深海
    深海 (楼主)
    2020-05-19
    @Mark service实现接口方式 的话 就不能用了吗
    0 回复
  • @关惠民 需要在方法上面添加注解
    0 回复