2024-04-11 14:13:03 +08:00
|
|
|
|
server:
|
|
|
|
|
port: 9999
|
|
|
|
|
servlet:
|
2024-04-24 11:14:26 +08:00
|
|
|
|
context-path: /kangarooDataCenterV3
|
2024-04-11 14:13:03 +08:00
|
|
|
|
localIP: 127.0.0.1
|
|
|
|
|
tomcat:
|
|
|
|
|
uri-encoding: utf-8
|
|
|
|
|
spring:
|
|
|
|
|
jackson:
|
|
|
|
|
date-format: yyyy-MM-dd HH:mm:ss
|
|
|
|
|
time-zone: GMT+8
|
|
|
|
|
application:
|
|
|
|
|
name: kangarooDataCenter
|
|
|
|
|
# mvc:
|
|
|
|
|
# pathmatch:
|
|
|
|
|
# use-suffix-pattern: true
|
|
|
|
|
profiles:
|
|
|
|
|
# active: @profileActive@
|
|
|
|
|
active: @profile.active@
|
|
|
|
|
# active: dev
|
|
|
|
|
servlet:
|
|
|
|
|
multipart:
|
|
|
|
|
enabled: true
|
|
|
|
|
#单个文件的大小
|
|
|
|
|
max-file-size: 100MB
|
|
|
|
|
#单次请求的文件的总大小
|
|
|
|
|
max-request-size: 100MB
|
|
|
|
|
# 默认数据源设置
|
|
|
|
|
datasource:
|
|
|
|
|
dynamic:
|
|
|
|
|
primary: master #设置默认的数据源或者数据源组,默认值即为master
|
|
|
|
|
strict: true #严格匹配数据源,默认false. true未匹配到指定数据源时抛异常,false使用默认数据源
|
|
|
|
|
druid:
|
|
|
|
|
initial-size: 10 # 初始化时建立物理连接的个数。初始化发生在显示调用init方法,或者第一次getConnection时
|
|
|
|
|
min-idle: 10 # 最小连接池数量
|
|
|
|
|
maxActive: 200 # 最大连接池数量
|
|
|
|
|
maxWait: 60000 # 获取连接时最大等待时间,单位毫秒。配置了maxWait之后,缺省启用公平锁,并发效率会有所下降,如果需要可以通过配置
|
|
|
|
|
timeBetweenEvictionRunsMillis: 60000 # 关闭空闲连接的检测时间间隔.Destroy线程会检测连接的间隔时间,如果连接空闲时间大于等于minEvictableIdleTimeMillis则关闭物理连接。
|
|
|
|
|
minEvictableIdleTimeMillis: 300000 # 连接的最小生存时间.连接保持空闲而不被驱逐的最小时间
|
|
|
|
|
validationQuery: SELECT 1 FROM DUAL # 验证数据库服务可用性的sql.用来检测连接是否有效的sql 因数据库方言而差, 例如 oracle 应该写成 SELECT 1 FROM DUAL
|
|
|
|
|
testWhileIdle: true # 申请连接时检测空闲时间,根据空闲时间再检测连接是否有效.建议配置为true,不影响性能,并且保证安全性。申请连接的时候检测,如果空闲时间大于timeBetweenEvictionRun
|
|
|
|
|
testOnBorrow: false # 申请连接时直接检测连接是否有效.申请连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。
|
|
|
|
|
testOnReturn: false # 归还连接时检测连接是否有效.归还连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。
|
|
|
|
|
poolPreparedStatements: true # 开启PSCache
|
|
|
|
|
maxPoolPreparedStatementPerConnectionSize: 20 #设置PSCache值
|
|
|
|
|
connectionErrorRetryAttempts: 3 # 连接出错后再尝试连接三次
|
|
|
|
|
breakAfterAcquireFailure: true # 数据库服务宕机自动重连机制
|
|
|
|
|
timeBetweenConnectErrorMillis: 300000 # 连接出错后重试时间间隔
|
|
|
|
|
asyncInit: true # 异步初始化策略
|
|
|
|
|
remove-abandoned: true # 是否自动回收超时连接
|
|
|
|
|
remove-abandoned-timeout: 1800 # 超时时间(以秒数为单位)
|
|
|
|
|
transaction-query-timeout: 6000 # 事务超时时间
|
|
|
|
|
filters: stat,wall,log4j2
|
|
|
|
|
useGlobalDataSourceStat: true #合并多个DruidDataSource的监控数据
|
|
|
|
|
connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000 #通过connectProperties属性来打开mergeSql功能;慢SQL记录
|
|
|
|
|
batch:
|
|
|
|
|
job:
|
|
|
|
|
enabled: false
|
|
|
|
|
logging:
|
|
|
|
|
#日志配置路径
|
|
|
|
|
# config: classpath:log/logback-spring.xml
|
|
|
|
|
config: classpath:logback-spring.xml
|
2024-04-28 10:38:58 +08:00
|
|
|
|
encodings: UTF-8
|
2024-04-11 14:13:03 +08:00
|
|
|
|
file:
|
|
|
|
|
path: /Users/apple/Desktop/log/dev
|
|
|
|
|
mybatis:
|
|
|
|
|
mapper-locations: classpath*:com/hzya/**/*.xml
|
2024-04-29 16:14:45 +08:00
|
|
|
|
mybatis-plus:
|
|
|
|
|
mapper-locations: classpath*:com/hzya/**/*.xml # mapper XML文件位置
|
|
|
|
|
type-aliases-package: com.hzya.frame.*.entity # 实体类所在包路径
|
|
|
|
|
config-location: classpath:mybatis/mybatis-config.xml
|
|
|
|
|
global-config:
|
|
|
|
|
db-config:
|
|
|
|
|
id-type: auto # 主键策略
|
|
|
|
|
|