application.yml 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. server:
  2. port: 8086
  3. spring:
  4. application:
  5. name: dynamic-service
  6. config:
  7. import:
  8. # 文件上传配置
  9. servlet:
  10. multipart:
  11. max-file-size: 10MB # 单个文件最大10MB
  12. max-request-size: 100MB # 单次请求最大100MB(支持多文件上传)
  13. enabled: true
  14. datasource:
  15. url: jdbc:mysql://127.0.0.1:3306/hunlian?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&useSSL=false&allowPublicKeyRetrieval=true
  16. username: root
  17. password: Futu@2028@
  18. driver-class-name: com.mysql.cj.jdbc.Driver
  19. # HikariCP 连接池配置
  20. hikari:
  21. minimum-idle: 5 # 最小空闲连接数
  22. maximum-pool-size: 20 # 最大连接池大小
  23. connection-timeout: 30000 # 连接超时时间(毫秒)30秒
  24. idle-timeout: 600000 # 空闲连接超时时间(毫秒)10分钟
  25. max-lifetime: 1800000 # 连接最大存活时间(毫秒)30分钟
  26. connection-test-query: SELECT 1 # 连接测试查询
  27. # Redis配置
  28. redis:
  29. host: 127.0.0.1
  30. port: 6377
  31. password: Futu@2028@ # 如果有密码请填写
  32. database: 0 # 使用数据库0
  33. timeout: 3000ms
  34. lettuce:
  35. pool:
  36. max-active: 8 # 连接池最大连接数
  37. max-idle: 8 # 连接池最大空闲连接数
  38. min-idle: 0 # 连接池最小空闲连接数
  39. max-wait: -1ms # 连接池最大阻塞等待时间
  40. # MyBatis-Plus 配置
  41. mybatis-plus:
  42. mapper-locations: classpath*:/mapper/**/*.xml
  43. type-aliases-package: com.zhentao.entity
  44. configuration:
  45. map-underscore-to-camel-case: true
  46. log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
  47. global-config:
  48. db-config:
  49. id-type: auto
  50. logic-delete-field: status
  51. logic-delete-value: 0
  52. logic-not-delete-value: 1
  53. # 日志配置
  54. logging:
  55. level:
  56. com.zhentao: debug
  57. com.zhentao.mapper: debug
  58. minio:
  59. endpoint: http://minio.zhongruanke.cn
  60. accessKey: minioadmin
  61. secretKey: minioadmin123
  62. bucketName: dynamic-comments
  63. proofBucketName: proof-of-success
  64. # 动态媒体本地存储配置
  65. dynamic:
  66. media:
  67. upload:
  68. path: D:/marriage-media/dynamics/ # 本地存储路径
  69. url:
  70. prefix: http://localhost:8083/media/ # 直接访问dynamic服务
  71. # 微信小程序配置(用于内容安全检测)
  72. wechat:
  73. miniapp:
  74. appid: wx3e90d662a801266e
  75. secret: d82ce405f04a47de14382bef4180239d
  76. # 网易易盾内容安全配置
  77. yidun:
  78. secret-id: 6153a3748fb5b2be97b73be77d04ba17 # 替换为你的网易易盾SecretId
  79. secret-key: 3bd803e720aeceb3fcd54c664e88b9cd # 替换为你的网易易盾SecretKey
  80. business-id: 1d3aa4372481126b9ec151ef84f9a7ee # 替换为你的业务ID