sa-common.yaml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. spring:
  2. # 数据库连接信息
  3. datasource:
  4. url: jdbc:p6spy:mysql://210.16.189.72:3326/123?autoReconnect=true&useServerPreparedStmts=false&rewriteBatchedStatements=true&characterEncoding=UTF-8&useSSL=false&allowMultiQueries=true&serverTimezone=Asia/Shanghai
  5. username: root
  6. password: kptzhu@163.com
  7. initial-size: 2
  8. min-idle: 2
  9. max-active: 10
  10. max-wait: 60000
  11. time-between-eviction-runs-millis: 60000
  12. min-evictable-idle-time-millis: 300000
  13. driver-class-name: com.p6spy.engine.spy.P6SpyDriver
  14. filters: stat
  15. druid:
  16. username: druid
  17. password: Gm@5418#
  18. login:
  19. enabled: false
  20. method:
  21. pointcut: net.lab1024.sa..*Service.*
  22. stat-view-servlet:
  23. enabled: false
  24. spring:
  25. datasource:
  26. druid:
  27. stat-view-servlet:
  28. enabled: false
  29. filter:
  30. stat:
  31. enabled: false
  32. exclusions: /*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*
  33. web-stat-filter:
  34. enabled: false
  35. # mvc swagger bugfix
  36. mvc:
  37. pathmatch:
  38. matching-strategy: ant_path_matcher
  39. # redis 连接池配置信息
  40. # redis:
  41. # database: 1
  42. # host: 127.0.0.1
  43. # lettuce:
  44. # pool:
  45. # max-active: 5
  46. # min-idle: 1
  47. # max-idle: 3
  48. # max-wait: 30000ms
  49. # port: 6379
  50. # timeout: 10000ms
  51. # password:
  52. # 上传文件大小配置
  53. servlet:
  54. multipart:
  55. max-file-size: 30MB
  56. max-request-size: 30MB
  57. # json序列化相关配置
  58. jackson:
  59. serialization:
  60. write-enums-using-to-string: true
  61. write-dates-as-timestamps: false
  62. deserialization:
  63. read-enums-using-to-string: true
  64. fail-on-unknown-properties: false
  65. default-property-inclusion: always
  66. date-format: yyyy-MM-dd HH:mm:ss
  67. time-zone: GMT+8
  68. # 缓存实现类型
  69. cache:
  70. type: caffeine
  71. #swagger: 提高swagger 方法名称有重复的日志提示
  72. logging:
  73. level:
  74. springfox:
  75. documentation:
  76. spring:
  77. web:
  78. readers:
  79. operation:
  80. CachingOperationNameGenerator: warn
  81. scanners:
  82. ApiListingReferenceScanner: warn
  83. # 文件上传 配置
  84. file:
  85. storage:
  86. mode: cloud
  87. local:
  88. path: ${localPath:/home}/smart_admin_v2/upload/
  89. cloud:
  90. region: oss-cn-hangzhou
  91. endpoint: oss-cn-hangzhou.aliyuncs.com
  92. bucket-name: 1024lab-smart-admin
  93. access-key:
  94. secret-key:
  95. url:
  96. expire: 7200000
  97. public: https://${file.storage.cloud.bucket-name}.${file.storage.cloud.endpoint}/
  98. # swagger 配置
  99. swagger:
  100. title: SmartAdmin
  101. description: SmartAdmin 2.0
  102. version: 2.0
  103. host: localhost:${server.port}
  104. package: net.lab1024.sa
  105. tag-class: net.lab1024.sa.common.constant.SwaggerTagConst
  106. team-url: https://www.1024lab.net/
  107. # RestTemplate 请求配置
  108. http:
  109. pool:
  110. max-total: 20
  111. connect-timeout: 50000
  112. read-timeout: 50000
  113. write-timeout: 50000
  114. keep-alive: 300000
  115. # token相关配置
  116. token:
  117. key: sa-jwt-key
  118. expire-day: 7
  119. # 跨域配置
  120. access-control-allow-origin: '*'
  121. # 心跳配置
  122. heart-beat:
  123. interval-seconds: 300
  124. # 热加载配置
  125. reload:
  126. interval-seconds: 300