application.yml 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. server:
  2. port: 8081
  3. ip: 127.0.0.1
  4. servlet:
  5. context-path: /
  6. compression:
  7. enabled: true
  8. mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*
  9. management:
  10. endpoints:
  11. web:
  12. exposure:
  13. include: metrics,httptrace
  14. spring:
  15. servlet:
  16. multipart:
  17. max-file-size: -1
  18. max-request-size: -1
  19. #json 时间戳统一转换
  20. jackson:
  21. date-format: yyyy-MM-dd HH:mm:ss
  22. time-zone: GMT+8
  23. aop:
  24. proxy-target-class: true
  25. #配置freemarker
  26. freemarker:
  27. # 设置模板后缀名
  28. suffix: .ftl
  29. # 设置文档类型
  30. content-type: text/html
  31. # 设置页面编码格式
  32. charset: UTF-8
  33. # 设置页面缓存
  34. cache: false
  35. prefer-file-system-access: false
  36. # 设置ftl文件路径
  37. template-loader-path:
  38. - classpath:/templates
  39. # 设置静态文件路径,js,css等
  40. mvc:
  41. static-path-pattern: /**
  42. resource:
  43. static-locations: classpath:/static/,classpath:/public/
  44. autoconfigure:
  45. exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
  46. datasource:
  47. # name: fendo
  48. # url: jdbc:mysql://39.97.120.42:3306/track?characterEncoding=UTF-8&useUnicode=true&useSSL=false
  49. # username: hcst
  50. # password: test@20190531
  51. type: com.alibaba.druid.pool.DruidDataSource
  52. driver-class-name: com.mysql.jdbc.Driver
  53. dynamic:
  54. druid: # 全局druid参数,绝大部分值和默认保持一致。(现已支持的参数如下,不清楚含义不要乱设置)
  55. # 连接池的配置信息
  56. # 初始化大小,最小,最大
  57. connection-init-sql: set names utf8mb4
  58. initial-size: 5
  59. min-idle: 5
  60. maxActive: 20
  61. # 配置获取连接等待超时的时间
  62. maxWait: 60000
  63. # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
  64. timeBetweenEvictionRunsMillis: 60000
  65. # 配置一个连接在池中最小生存的时间,单位是毫秒
  66. minEvictableIdleTimeMillis: 300000
  67. validationQuery: SELECT 1 FROM DUAL
  68. testWhileIdle: true
  69. testOnBorrow: false
  70. testOnReturn: false
  71. # 打开PSCache,并且指定每个连接上PSCache的大小
  72. poolPreparedStatements: true
  73. maxPoolPreparedStatementPerConnectionSize: 20
  74. # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
  75. filters: stat,slf4j
  76. # 通过connectProperties属性来打开mergeSql功能;慢SQL记录
  77. connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
  78. datasource:
  79. master:
  80. url: jdbc:mysql://39.97.120.42:3306/track?characterEncoding=UTF-8&useUnicode=true&useSSL=false
  81. username: hcst
  82. password: test@20190531
  83. driver-class-name: com.mysql.jdbc.Driver
  84. # 多数据源配置
  85. #multi-datasource1:
  86. # url: jdbc:mysql://39.106.184.70:3306/track?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true
  87. # username: hcst
  88. # password: test@20190531
  89. # driver-class-name: com.mysql.jdbc.Driver
  90. #mybatis plus 设置
  91. mybatis-plus:
  92. mapper-locations: classpath*:classpath*:cn/com/ctop/**/xml/*Mapper.xml
  93. global-config:
  94. # 关闭MP3.0自带的banner
  95. banner: false
  96. db-config:
  97. #主键类型 0:"数据库ID自增",1:"该类型为未设置主键类型", 2:"用户输入ID",3:"全局唯一ID (数字类型唯一ID)", 4:"全局唯一ID UUID",5:"字符串全局唯一ID (idWorker 的字符串表示)";
  98. id-type: 4
  99. # 默认数据库表下划线命名
  100. table-underline: true
  101. configuration:
  102. # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
  103. log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
  104. logging:
  105. level:
  106. root: info
  107. config: classpath:logback-dev.xml