Browse Source

修改spring data jdbc配置

Sand Wen 8 years ago
parent
commit
1919616a23
1 changed files with 12 additions and 14 deletions
  1. 12 14
      svr-dict.yml

+ 12 - 14
svr-dict.yml

@ -4,6 +4,14 @@ logging:
      netflix: ERROR
spring:
  datasource:
    driver-class-name: com.mysql.jdbc.Driver
    max-active: 20
    max-idle: 8
    min-idle: 8
    validation-query: SELECT 1
    test-on-borrow: true
  # REDIS
  redis:
    database: 0 # Database index used by the connection factory.
@ -20,16 +28,6 @@ spring:
      max-wait: -1 # Maximum amount of time (in milliseconds) a connection allocation should block before throwing an exception when the pool is exhausted. Use a negative value to block indefinitely.
      min-idle: 1 # Target for the minimum number of idle connections to maintain in the pool. This setting only has an effect if it is positive.
data-source:
  driver-class-name: com.mysql.jdbc.Driver
  initialize-size: 1
  max-total: 20
  max-idle: 10
  min-idle: 1
  validation-query: SELECT 1
  test-on-borrow: true
  remove-abandoned-timeout: 55
---
spring:
  profiles: dev
@ -37,10 +35,10 @@ spring:
  redis:
    host: 192.168.1.220 # Redis server host.
data-source:
  url: jdbc:mysql://192.168.1.220:3306/healtharchive?useUnicode=true&characterEncoding=UTF-8
  user-name: ha
  password: ha
  datasource:
    url: jdbc:mysql://192.168.1.220:3306/healtharchive?useUnicode=true&characterEncoding=UTF-8
    username: ha
    password: ha
---
spring: