application.yml 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. # 内嵌服务器配置tomcat,jetty
  2. server:
  3. port: 8085
  4. # mysql
  5. spring:
  6. application:
  7. name: TOURIST
  8. datasource:
  9. type: com.alibaba.druid.pool.DruidDataSource
  10. url: jdbc:mysql://10.100.2.12:3306/tourist-test?useUnicode=true&characterEncoding=utf8&useSSL=false
  11. username: root
  12. password: Wo4heike
  13. driver-class-name: com.mysql.jdbc.Driver
  14. # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
  15. filters: stat,wall,log4j
  16. # 通过connectProperties属性来打开mergeSql功能;慢SQL记录
  17. connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
  18. # 合并多个DruidDataSource的监控数据
  19. useGlobalDataSourceStat: true
  20. # 连接池配置
  21. max-active: 200
  22. initial-size: 5
  23. max-wait: 60000
  24. min-idle: 1
  25. pool-prepared-statements: true
  26. max-open-prepared-statements: 20
  27. #在空闲连接回收器线程运行期间休眠的时间值,以毫秒为单位,一般比minEvictableIdleTimeMillis小
  28. time-between-eviction-runs-millis: 60000
  29. #连接池中连接,在时间段内一直空闲,被逐出连接池的时间(1000*60*60),以毫秒为单位
  30. min-evictable-idle-time-millis: 300000
  31. # 连接有效性检测
  32. test-while-idle: true
  33. test-on-borrow: false
  34. test-on-return: false
  35. validation-query: SELECT 1
  36. redis:
  37. host: 10.200.1.36
  38. password: 123456
  39. port: 6379
  40. jackson:
  41. serialization: true
  42. time-zone: GMT+8
  43. date-format: java.text.SimpleDateFormat
  44. http:
  45. # 文件上传限制
  46. multipart:
  47. enabled: true
  48. max-file-size: 50mb
  49. max-request-size: 200mb
  50. mybatis-plus:
  51. # 如果是放在src/main/java目录下 classpath:/com/yourpackage/*/mapper/*Mapper.xml
  52. # 如果是放在resource目录 classpath:/mapper/*Mapper.xml
  53. mapper-locations: classpath:/mapper/*Mapper.xml
  54. #实体扫描,多个package用逗号或者分号分隔
  55. typeAliasesPackage: com.yingying.tourist.domain
  56. global-config:
  57. #主键类型 0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
  58. id-type: 0
  59. #字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
  60. field-strategy: 2
  61. #驼峰下划线转换
  62. db-column-underline: true
  63. #mp2.3+ 全局表前缀 mp_
  64. #table-prefix: t_
  65. #刷新mapper 调试神器
  66. #refresh-mapper: true
  67. #数据库大写下划线转换
  68. #capital-mode: true
  69. # Sequence序列接口实现类配置
  70. # key-generator: com.baomidou.mybatisplus.incrementer.OracleKeyGenerator
  71. #逻辑删除配置(下面3个配置)
  72. logic-delete-value: 1
  73. logic-not-delete-value: 0
  74. sql-injector: com.baomidou.mybatisplus.mapper.LogicSqlInjector
  75. #自定义填充策略接口实现
  76. #meta-object-handler: com.baomidou.springboot.MyMetaObjectHandler
  77. configuration:
  78. #配置返回数据库(column下划线命名&&返回java实体是驼峰命名),自动匹配无需as(没开启这个,SQL需要写as: select user_id as userId)
  79. map-underscore-to-camel-case: true
  80. cache-enabled: false
  81. #配置JdbcTypeForNull, oracle数据库必须配置
  82. jdbc-type-for-null: 'null'
  83. # log
  84. logging:
  85. config: classpath:logback.xml
  86. session:
  87. domain: wx.yingyinglicai.com