You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

248 lines
7.8 KiB

2 years ago
2 years ago
2 years ago
  1. # 端口配置
  2. server:
  3. port: 8080
  4. servlet:
  5. # 项目的前缀名
  6. context-path: /zsjyapi
  7. spring:
  8. # 配置数据源
  9. datasource:
  10. # 使用阿里的Druid连接池
  11. type: com.alibaba.druid.pool.DruidDataSource
  12. driver-class-name: com.mysql.cj.jdbc.Driver
  13. # 填写你数据库的url、登录名、密码和数据库名
  14. url: jdbc:mysql://127.0.0.1:3306/zsjy?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2b8&useSSL=true&tinyInt1isBit=false
  15. username: root
  16. # password: 1174Mysql5132
  17. password: root
  18. druid:
  19. # 连接池的配置信息
  20. # 初始连接数
  21. initialSize: 5
  22. # 最小连接池数量
  23. minIdle: 5
  24. # 最大连接池数量
  25. maxActive: 20
  26. # 配置获取连接等待超时的时间
  27. maxWait: 60000
  28. # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
  29. timeBetweenEvictionRunsMillis: 60000
  30. # 配置一个连接在池中最小生存的时间,单位是毫秒
  31. minEvictableIdleTimeMillis: 300000
  32. # 配置一个连接在池中最大生存的时间,单位是毫秒
  33. maxEvictableIdleTimeMillis: 900000
  34. # 配置检测连接是否有效
  35. validationQuery: SELECT 1 FROM DUAL
  36. testWhileIdle: true
  37. testOnBorrow: false
  38. testOnReturn: false
  39. # 打开PSCache,并且指定每个连接上PSCache的大小
  40. poolPreparedStatements: true
  41. maxPoolPreparedStatementPerConnectionSize: 20
  42. # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
  43. filters: stat,wall,log4j
  44. # 通过connectProperties属性来打开mergeSql功能;慢SQL记录
  45. connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
  46. # 配置DruidStatFilter
  47. webStatFilter:
  48. enabled: true
  49. url-pattern: "/*"
  50. exclusions: "*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*"
  51. # 配置DruidStatViewServlet
  52. statViewServlet:
  53. url-pattern: "/druid/*"
  54. # IP白名单(没有配置或者为空,则允许所有访问)
  55. allow: 127.0.0.1,192.168.163.1
  56. # IP黑名单 (存在共同时,deny优先于allow)
  57. deny: 192.168.1.73
  58. # 禁用HTML页面上的“Reset All”功能
  59. reset-enable: false
  60. # 登录名
  61. login-username: admin
  62. # 登录密码
  63. login-password: 123456
  64. # 自定义国际化配置
  65. messages:
  66. # 国际化资源文件路径
  67. basename: i18n/messages
  68. encoding: UTF-8
  69. # Redis数据源
  70. redis:
  71. # 缓存库默认索引0
  72. database: 0
  73. # Redis服务器地址
  74. host: 127.0.0.1
  75. # Redis服务器连接端口
  76. port: 6379
  77. # Redis服务器连接密码(默认为空)
  78. password:
  79. # 连接超时时间(毫秒)
  80. timeout: 6000
  81. # 默认的数据过期时间,主要用于shiro权限管理
  82. expire: 2592000
  83. jedis:
  84. pool:
  85. max-active: 1000 # 连接池最大连接数(使用负值表示没有限制)
  86. max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制)
  87. max-idle: 10 # 连接池中的最大空闲连接
  88. min-idle: 1 # 连接池中的最小空闲连接
  89. servlet:
  90. multipart:
  91. # 过滤springmvc的文件上传
  92. enabled: false
  93. # 单个文件最大值
  94. max-file-size: 50MB
  95. # 上传文件总的最大值
  96. max-request-size: 100MB
  97. #邮件配置
  98. mail:
  99. # 设置邮箱主机
  100. host: smtp.qq.com
  101. # 开启邮箱POP3/SMTP服务,获取客户端授权码(注意并不是邮箱密码,而是授权码)
  102. password:
  103. # 邮箱的用户名
  104. username:
  105. properties:
  106. mail:
  107. smtp:
  108. # 设置是否需要认证,如果为true,那么用户名和密码就必须的。如果设置false,可以不设置用户名和密码,当然也得看你的对接的平台是否支持无密码进行访问的。
  109. auth: true
  110. starttls:
  111. # STARTTLS[1] 是对纯文本通信协议的扩展。它提供一种方式将纯文本连接升级为加密连接(TLS或SSL),而不是另外使用一个端口作加密通信。
  112. enable: true
  113. require: true
  114. alisms:
  115. accessKeyId:
  116. accessKeySecret:
  117. regionId: cn-hangzhou
  118. signName: JavaWeb
  119. templateCode:
  120. thymeleaf:
  121. # 默认true,开发是设置false,上线是设置为true以便提高性能
  122. # 开发时关闭缓存,不然没法看到实时页面
  123. cache: false
  124. enabled: true #开启thymeleaf视图解析
  125. encoding: UTF-8
  126. #模板的模式,支持 HTML, XML TEXT JAVASCRIPT
  127. #严格的HTML语法模式
  128. mode: HTML
  129. # 指定模板所在的目录
  130. prefix: classpath:/templates/
  131. # prefix: file:D:\\dev\\ideaprojects\\zhonghezifu\\javaweb-admin\\src\\main\\resources\\templates\\
  132. #后缀名
  133. suffix: .html
  134. # # 检查模板路径是否存在
  135. # check-template-location: true
  136. servlet:
  137. content-type: text/html
  138. # enabled: true
  139. # check-template: false
  140. jms:
  141. # 默认情况下activemq提供的是queue模式,若要使用topic模式需要配置下面配置
  142. pub-sub-domain: false
  143. # activemq消息队列
  144. activemq:
  145. #队列地址
  146. broker-url: tcp://127.0.0.1:61616
  147. #是否是内存模式(内置MQ,true是 false否)
  148. in-memory: false
  149. # 等待消息发送响应的时间。设置为0等待永远
  150. send-timeout: 0
  151. #账户
  152. user: 'admin'
  153. #密码
  154. password: '123456'
  155. # 配置rabbitMq 服务器
  156. rabbitmq:
  157. host: 127.0.0.1
  158. port: 5672
  159. username: guest
  160. password: guest
  161. #虚拟host 可以不设置,使用server默认host
  162. virtual-host: /
  163. #消息确认配置项
  164. #确认消息已发送到交换机(Exchange)
  165. publisher-confirms: true
  166. #确认消息已发送到队列(Queue)
  167. publisher-returns: true
  168. listener:
  169. simple:
  170. #acknowledge-mode: manual #设置确认模式手工确认
  171. concurrency: 1 #消费者最小数量
  172. max-concurrency: 10 # 消费者最大数量
  173. prefetch: 5 # 单次可拉取消息数量
  174. cache:
  175. connection:
  176. # 缓存连接模式,默认一个连接,多个channel
  177. mode: channel
  178. # 多个连接,多个channel
  179. # mode: connection
  180. # Shiro
  181. shiro:
  182. cipher-key: f/SX5TIve5WWzT4aQlABJA==
  183. cookie-name: shiro-cookie
  184. user:
  185. # 登录地址
  186. loginUrl: /login
  187. # 权限认证失败地址
  188. unauthorizedUrl: /unauth
  189. # 首页地址
  190. indexUrl: /index
  191. # 验证码开关
  192. captchaEnabled: true
  193. # 验证码类型 math 数组计算 char 字符
  194. captchaType: math
  195. cookie:
  196. # 设置Cookie的域名 默认空,即当前访问的域名
  197. domain:
  198. # 设置cookie的有效访问路径
  199. path: /
  200. # 设置HttpOnly属性
  201. httpOnly: true
  202. # 设置Cookie的过期时间,天为单位
  203. maxAge: 30
  204. session:
  205. # Session超时时间(默认30分钟)
  206. expireTime: 300
  207. # 同步session到数据库的周期(默认1分钟)
  208. dbSyncPeriod: 1
  209. # 相隔多久检查一次session的有效性,默认就是10分钟
  210. validationInterval: 10
  211. # 自定义配置
  212. javaweb:
  213. # 图片域名
  214. image-url: http://localhost:9011
  215. # 是否演示模式:true是,false否
  216. app-debug: false
  217. # 文件上传
  218. file:
  219. #上传的服务器上的映射文件夹
  220. accessPath: /uploads/
  221. #静态资源对外暴露的访问路径
  222. staticAccessPath: /**
  223. #静态资源实际存储路径
  224. uploadFolder: D:\JavaWeb\JavaWeb_Layui_Pro\uploads\
  225. # 代码生成
  226. generate:
  227. # 作者
  228. author: 赵贺
  229. # 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
  230. packageName: com.javaweb.admin
  231. # 模块名
  232. moduleName: javaweb-admin
  233. # 自动去除表前缀,默认是true
  234. autoRemovePre: true
  235. # 表前缀(生成类名不会包含表前缀,多个用逗号分隔)
  236. tablePrefix: sys_