application-dev.yml 3.6 KB

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