|
@@ -0,0 +1,50 @@
|
|
|
+logging:
|
|
|
+ config: classpath:logback-spring.xml
|
|
|
+
|
|
|
+# 日志是否打印sql
|
|
|
+showSql: true
|
|
|
+
|
|
|
+spring:
|
|
|
+ redis:
|
|
|
+ host: 127.0.0.1
|
|
|
+ port: 6379
|
|
|
+ password: Hao123
|
|
|
+ timeout: 10000ms
|
|
|
+ lettuce:
|
|
|
+ pool:
|
|
|
+ max-active: 8
|
|
|
+ max-wait: -1ms
|
|
|
+ max-idle: 8
|
|
|
+ min-idle: 0
|
|
|
+ database: 0
|
|
|
+
|
|
|
+db:
|
|
|
+ postgre:
|
|
|
+ druid:
|
|
|
+ url: jdbc:postgresql://127.0.0.1:5432/luckysheetdb?useSSL=false
|
|
|
+ driverClassName: org.postgresql.Driver
|
|
|
+ username: postgres
|
|
|
+ password: 123456
|
|
|
+ # 初始化大小,最小,最大
|
|
|
+ initial-size: 8
|
|
|
+ min-idle: 1
|
|
|
+ max-active: 20
|
|
|
+ # 配置获取连接等待超时的时间
|
|
|
+ max-wait: 60000
|
|
|
+ # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
|
|
|
+ time-between-eviction-runsMillis: 60000
|
|
|
+ # 配置一个连接在池中最小生存的时间,单位是毫秒
|
|
|
+ min-evictable-idle-timeMillis: 300000
|
|
|
+ validation-query: select 1
|
|
|
+ test-while-idle: true
|
|
|
+ test-on-borrow: false
|
|
|
+ test-on-return: false
|
|
|
+ # 打开PSCache,并且指定每个连接上PSCache的大小
|
|
|
+ pool-prepared-statements: true
|
|
|
+ max-open-prepared-statements: 20
|
|
|
+ # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
|
|
|
+ max-pool-prepared-statement-per-connection-size: 20
|
|
|
+ filters: stat,wall
|
|
|
+ # 通过connectProperties属性来打开mergeSql功能;慢SQL记录
|
|
|
+ connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
|
|
|
+ use-global-data-source-stat: true
|