application.properties 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. #
  2. # Licensed to the Apache Software Foundation (ASF) under one or more
  3. # contributor license agreements. See the NOTICE file distributed with
  4. # this work for additional information regarding copyright ownership.
  5. # The ASF licenses this file to You under the Apache License, Version 2.0
  6. # (the "License"); you may not use this file except in compliance with
  7. # the License. You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. #
  17. #
  18. ########################## application级别通用配置 ##########################
  19. ##### druid配置
  20. #连接池配置(通常来说,只需要修改initialSize、minIdle、maxActive
  21. spring.datasource.druid.initial-size=10
  22. spring.datasource.druid.max-active=500
  23. spring.datasource.druid.min-idle=10
  24. # 配置获取连接等待超时的时间
  25. spring.datasource.druid.max-wait=60000
  26. #打开PSCache,并且指定每个连接上PSCache的大小
  27. spring.datasource.druid.pool-prepared-statements=true
  28. spring.datasource.druid.max-pool-prepared-statement-per-connection-size=20
  29. spring.datasource.druid.validation-query=SELECT 'x'
  30. spring.datasource.druid.test-on-borrow=false
  31. spring.datasource.druid.test-on-return=false
  32. spring.datasource.druid.test-while-idle=true
  33. #配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
  34. spring.datasource.druid.time-between-eviction-runs-millis=60000
  35. #配置一个连接在池中最小生存的时间,单位是毫秒
  36. spring.datasource.druid.min-evictable-idle-time-millis=300000
  37. spring.datasource.druid.filters=stat,wall
  38. # WebStatFilter配置,说明请参考Druid Wiki,配置_配置WebStatFilter
  39. #是否启用StatFilter默认值true
  40. spring.datasource.druid.web-stat-filter.enabled=true
  41. spring.datasource.druid.web-stat-filter.url-pattern=/*
  42. spring.datasource.druid.web-stat-filter.exclusions="*.js , *.gif ,*.jpg ,*.png ,*.css ,*.ico , /druid/*"
  43. spring.datasource.druid.web-stat-filter.session-stat-max-count=1000
  44. spring.datasource.druid.web-stat-filter.profile-enable=true
  45. spring.datasource.druid.web-stat-filter.session-stat-enable=false
  46. # StatViewServlet配置
  47. #展示Druid的统计信息,StatViewServlet的用途包括:1.提供监控信息展示的html页面2.提供监控信息的JSON API
  48. #是否启用StatViewServlet默认值true
  49. spring.datasource.druid.stat-view-servlet.enabled=true
  50. #根据配置中的url-pattern来访问内置监控页面,如果是上面的配置,内置监控页面的首页是/druid/index.html例如:http://127.0.0.1:9000/druid/index.html
  51. spring.datasource.druid.stat-view-servlet.url-pattern=/druid/*
  52. #允许清空统计数据
  53. spring.datasource.druid.stat-view-servlet.reset-enable=true
  54. spring.datasource.druid.stat-view-servlet.login-username=admin
  55. spring.datasource.druid.stat-view-servlet.login-password=admin
  56. ##### mybatis-plus配置
  57. #字段策略 IGNORED:"忽略判断",NOT_NULL:"非 NULL 判断"),NOT_EMPTY:"非空判断"
  58. mybatis-plus.global-config.db-config.field-strategy=NOT_NULL
  59. #逻辑删除配置
  60. mybatis-plus.global-config.db-config.logic-delete-field=is_delete
  61. mybatis-plus.global-config.db-config.logic-delete-value=1
  62. mybatis-plus.global-config.db-config.logic-not-delete-value=0
  63. # 原生配置
  64. mybatis-plus.configuration.map-underscore-to-camel-case=true
  65. mybatis-plus.configuration.cache-enabled=false
  66. logging.config= classpath:log4j2.xml
  67. ####### 国际化配置
  68. spring.messages.basename=i18n/messages
  69. # 国际化编码
  70. spring.messages.encoding=utf-8
  71. # 表示 messages 文件的缓存失效时间,如果不配置则缓存一直有效。
  72. spring.messages.cache-duration=3600
  73. # 在找不到当前系统对应的资源文件时,如果该属性为 true,则会默认查找当前系统对应的资源文件,否则就返回 null,返回 null 之后,最终又会调用到系统默认的 messages.properties 文件
  74. spring.messages.fallback-to-system-locale=true