1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- spring:
- datasource:
- driver-class-name: com.mysql.cj.jdbc.Driver
- url: jdbc:mysql://localhost:3306/ittimbackend?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai
- username: root
- password: root
- druid:
- initialSize: 5 #初始化时建立物理连接的个数。初始化发生在显示调用init方法,或者第一次getConnection时
- minIdle: 5 #最小连接池数量
- maxActive: 50 #最大连接池数量
- maxWait: 60000 #获取连接时最大等待时间,单位毫秒。配置了maxWait之后,缺省启用公平锁,并发效率会有所下降,如果需要可以通过配置useUnfairLock属性为true使用非公平锁。
- timeBetweenEvictionRunsMillis: 60000
- minEvictableIdleTimeMillis: 300000
- validationQuery: SELECT 1
- testWhileIdle: true
- testOnBorrow: true
- testOnReturn: false
- poolPreparedStatements: true #是否缓存preparedStatement,也就是PSCache。PSCache对支持游标的数据库性能提升巨大,比如说oracle。在mysql5.5以下的版本中没有PSCache功能,建议关闭掉。5.5及以上版本有PSCache,建议开启。
- maxPoolPreparedStatementPerConnectionSize: 20
- filters: stat,wall #属性类型是字符串,通过别名的方式配置扩展插件,常用的插件有:监控统计用的filter:stat,日志用的filter:log4j, 防御sql注入的filter:wall
- connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
- stat-view-servlet: # StatViewServlet配置,说明请参考Druid Wiki,配置_StatViewServlet配置
- #allow: 127.0.0.1 #设置白名单
- enabled: true #是否开启druid的数据统计界面 默认false
- url-pattern: /druid/* #servlet映射规则,默认访问http:/127.0.0.1:端口号/项目名/druid/login.html
- reset-enable: false #是否允许清空统计数据 默认false
- login-username: ittimDruid
- login-password: ittim@2020qqq...A
- filter:
- stat:
- enabled: true
- redis:
- host: 124.70.140.103
- password:
- database: 0
- port: 6379
- timeout: 10000
- jedis:
- pool:
- max-active: -1 # 连接池最大连接数(使用负值表示没有限制)
- max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制)
- max-idle: 8 # 连接池中的最大空闲连接
- min-idle: 0 # 连接池中的最小空闲连接
- redis2:
- host: 124.70.140.103
- password:
- database: 1
- port: 6379
- timeout: 10000
- logging:
- level:
- org.wf.jwtp: DEBUG
- com.xkcoding: DEBUG
- com.xkcoding.orm.mybatis.plus.mapper: trace
- mybatis-plus:
- mapper-locations: classpath:mappers/*.xml
- #实体扫描,多个package用逗号或者分号分隔
- typeAliasesPackage: com.ittim.admin.entity,com.ittim.security.vo
- global-config:
- # 数据库相关配置
- db-config:
- #主键类型 AUTO:"数据库ID自增", INPUT:"用户输入ID",ID_WORKER:"全局唯一ID (数字类型唯一ID)", UUID:"全局唯一ID UUID";
- id-type: auto
- #字段策略 IGNORED:"忽略判断",NOT_NULL:"非 NULL 判断"),NOT_EMPTY:"非空判断"
- field-strategy: not_empty
- #驼峰下划线转换
- table-underline: true
- #是否开启大写命名,默认不开启
- #capital-mode: true
- #逻辑删除配置
- #logic-delete-value: 1
- #logic-not-delete-value: 0
- db-type: mysql
- #刷新mapper 调试神器
- refresh: true
- # 原生配置
- configuration:
- map-underscore-to-camel-case: true
- cache-enabled: true
- # 开启sql打印
- log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|