application.yml 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. server:
  2. port: 18080
  3. tomcat:
  4. accesslog:
  5. enabled: true
  6. directory: /home/invoiceSrv/app/bin/logs/tomcat #日志存储目录
  7. pattern: '%t %a %A %m %U%q %s %D %I %B' #日志格式
  8. prefix: access #日志文件前缀
  9. rename-on-rotate: true #是否启用日志轮转
  10. # undertow:
  11. # # 指定工作者线程的 I/0 线程数,默认为 2 或者 CPU 的个数
  12. # io-threads: 2
  13. # # 指定工作者线程个数,默认为 I/O 线程个数的 8 倍
  14. # worker-threads: 8
  15. spring:
  16. application:
  17. name: invoice
  18. #\u4E0A\u4F20\u6587\u4EF6\u5927\u5C0F
  19. servlet:
  20. multipart:
  21. enabled: true
  22. max-file-size: 200MB
  23. max-request-size: 200MB
  24. profiles:
  25. active: dev
  26. jpa:
  27. show-sql: true
  28. main:
  29. allow-bean-definition-overriding: true
  30. resources:
  31. static-locations: classpath:static/,file:static/
  32. # password:
  33. mybatis-plus:
  34. mapper-locations: classpath:/mapper/*Mapper.xml,classpath*:/mapper/*/*Mapper.xml
  35. global-config:
  36. db-config:
  37. table-prefix: t_
  38. logging:
  39. config: classpath:logback-spring.xml
  40. path: d:/logs
  41. # configuration:
  42. # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
  43. #debug: true
  44. ---
  45. spring:
  46. profiles: dev
  47. datasource:
  48. #url: jdbc:mysql://172.31.1.10:3306/db_invoice?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&allowMultiQueries=true
  49. #username: root
  50. #password: Jkxy@mysql123
  51. #url: jdbc:mysql://127.0.0.1:3306/db_invoice?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&allowMultiQueries=true&allowPublicKeyRetrieval=true
  52. #username: root
  53. #password: root
  54. url: jdbc:mysql://39.106.56.5:3306/db_invoice?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&allowMultiQueries=true
  55. username: invoice
  56. password: invoiceX%190605
  57. driver-class-name: com.mysql.jdbc.Driver
  58. # \u4F7F\u7528druid\u6570\u636E\u6E90
  59. type: com.alibaba.druid.pool.DruidDataSource
  60. mail:
  61. host: smtp.qq.com #邮件发送服务器
  62. port: 587
  63. username: 862885632@qq.com
  64. password: axlmfkdxmixjbchh
  65. test-connection: true #测试连接
  66. properties:
  67. mail:
  68. smtp:
  69. auth: true
  70. enable: true
  71. redis:
  72. host: 127.0.0.1
  73. port: 6379
  74. rabbitmq:
  75. host: localhost
  76. port: 5672
  77. username: guest
  78. password: guest
  79. publisher-confirms: true
  80. publisher-returns: true
  81. listener:
  82. simple:
  83. acknowledge-mode: manual
  84. retry:
  85. enabled: true
  86. concurrency: 10
  87. max-concurrency: 10
  88. direct:
  89. acknowledge-mode: manual
  90. ---
  91. spring:
  92. profiles: prod
  93. datasource:
  94. url: jdbc:mysql://192.168.50.88:3306/db_invoice?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&allowMultiQueries=true
  95. username: root
  96. password: jk@123
  97. driver-class-name: com.mysql.jdbc.Driver
  98. # \u4F7F\u7528druid\u6570\u636E\u6E90
  99. type: com.alibaba.druid.pool.DruidDataSource
  100. platform: mysql
  101. druid:
  102. initial-size: 5 # 初始化大小
  103. min-idle: 5 # 最小
  104. max-active: 100 # 最大
  105. max-wait: 60000 # 配置获取连接等待超时的时间
  106. time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
  107. min-evictable-idle-time-millis: 300000 # 指定一个空闲连接最少空闲多久后可被清除,单位是毫秒
  108. validationQuery: select 'x'
  109. test-while-idle: true # 当连接空闲时,是否执行连接测试
  110. test-on-borrow: false # 当从连接池借用连接时,是否测试该连接
  111. test-on-return: false # 在连接归还到连接池时是否测试该连接
  112. filters: config,wall,stat # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
  113. poolPreparedStatements: true # 打开PSCache,并且指定每个连接上PSCache的大小
  114. maxPoolPreparedStatementPerConnectionSize: 20
  115. maxOpenPreparedStatements: 20
  116. # 通过connectProperties属性来打开mergeSql功能;慢SQL记录
  117. connectionProperties: druid.stat.slowSqlMillis=200;druid.stat.logSlowSql=true;config.decrypt=false
  118. # 合并多个DruidDataSource的监控数据
  119. #use-global-data-source-stat: true
  120. # #WebStatFilter配置,说明请参考Druid Wiki,配置_配置WebStatFilter
  121. # web-stat-filter:
  122. # enabled: true #是否启用StatFilter默认值true
  123. # url-pattern: /*
  124. # exclusions: /druid/*,*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico
  125. # session-stat-enable: true
  126. # session-stat-max-count: 10
  127. # #StatViewServlet配置,说明请参考Druid Wiki,配置_StatViewServlet配置
  128. # stat-view-servlet:
  129. # enabled: true #是否启用StatViewServlet默认值true
  130. # url-pattern: /druid/*
  131. # reset-enable: true
  132. # login-username: jkxy
  133. # login-password: jkxy@2019
  134. redis:
  135. host: 127.0.0.1
  136. port: 6379
  137. password: lq2uRBsf<vh2ouo
  138. rabbitmq:
  139. host: 127.0.0.1
  140. port: 5672
  141. username: guest
  142. password: guest
  143. publisher-confirms: true
  144. publisher-returns: true
  145. listener:
  146. simple:
  147. acknowledge-mode: manual
  148. retry:
  149. enabled: true
  150. concurrency: 10
  151. max-concurrency: 10
  152. direct:
  153. acknowledge-mode: manual