application.yml 3.2 KB

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