application.yml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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-dev?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. jpa:
  37. show-sql: true
  38. data:
  39. jpa:
  40. repositories:
  41. enabled: true
  42. redis:
  43. host: 10.10.12.175
  44. password: 123456
  45. port: 6379
  46. database: 0
  47. jackson:
  48. serialization: true
  49. time-zone: GMT+8
  50. date-format: java.text.SimpleDateFormat
  51. http:
  52. # 文件上传限制
  53. multipart:
  54. enabled: true
  55. max-file-size: 50mb
  56. max-request-size: 200mb
  57. thymeleaf:
  58. cache: false
  59. mode: LEGACYHTML5
  60. mybatis-plus:
  61. # 如果是放在src/main/java目录下 classpath:/com/yourpackage/*/mapper/*Mapper.xml
  62. # 如果是放在resource目录 classpath:/mapper/*Mapper.xml
  63. mapper-locations: classpath:/mapper/*Mapper.xml
  64. #实体扫描,多个package用逗号或者分号分隔
  65. typeAliasesPackage: com.yingying.tourist.domain
  66. global-config:
  67. #主键类型 0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
  68. id-type: 0
  69. #字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
  70. field-strategy: 2
  71. #驼峰下划线转换
  72. db-column-underline: true
  73. #mp2.3+ 全局表前缀 mp_
  74. #table-prefix: t_
  75. #刷新mapper 调试神器
  76. #refresh-mapper: true
  77. #数据库大写下划线转换
  78. #capital-mode: true
  79. # Sequence序列接口实现类配置
  80. # key-generator: com.baomidou.mybatisplus.incrementer.OracleKeyGenerator
  81. #逻辑删除配置(下面3个配置)
  82. logic-delete-value: 1
  83. logic-not-delete-value: 0
  84. sql-injector: com.baomidou.mybatisplus.mapper.LogicSqlInjector
  85. #自定义填充策略接口实现
  86. #meta-object-handler: com.baomidou.springboot.MyMetaObjectHandler
  87. configuration:
  88. #配置返回数据库(column下划线命名&&返回java实体是驼峰命名),自动匹配无需as(没开启这个,SQL需要写as: select user_id as userId)
  89. map-underscore-to-camel-case: true
  90. cache-enabled: false
  91. #配置JdbcTypeForNull, oracle数据库必须配置
  92. jdbc-type-for-null: 'null'
  93. # log
  94. logging:
  95. config: classpath:logback.xml