application.yaml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. # --- server ---
  2. server:
  3. port: 9901
  4. # --- spring ---
  5. spring:
  6. servlet:
  7. multipart:
  8. max-file-size: 10MB
  9. max-request-size: 20MB
  10. profiles:
  11. active: ${ACTIVE_ENV:dev}
  12. application:
  13. name: aitori-bi-service
  14. datasource:
  15. username: ${MYSQL_USERNAME:root}
  16. password: ${MYSQL_PASSWORD}
  17. url: jdbc:mysql://${MYSQL_HOST:127.0.0.1}:${MYSQL_PROT:3306}/${MYSQL_DATABASE:aitori}?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Tokyo&allowPublicKeyRetrieval=true&tinyInt1isBit=false
  18. driver-class-name: com.mysql.cj.jdbc.Driver
  19. data:
  20. redis:
  21. host: ${REDIS_HOST:127.0.0.1}
  22. port: ${REDIS_PORT:6379}
  23. password: ${REDIS_PASSWORD}
  24. database: ${REDIS_DATABASE:0}
  25. timeout: 5000
  26. lettuce:
  27. pool:
  28. enabled: true
  29. max-active: 8
  30. max-idle: 8
  31. min-idle: 1
  32. max-wait: -1
  33. shutdown-timeout: 100 # 关闭连接池时的超时时间(毫秒)
  34. # --- mybatis-plus ---
  35. mybatis-plus:
  36. type-aliases-package: com.aitori.entity
  37. mapper-locations: classpath*:/mapper/**/*.xml
  38. configuration:
  39. map-underscore-to-camel-case: true
  40. # --- log ---
  41. logging:
  42. level:
  43. com.aitori: info
  44. com.aitori.mapper: debug
  45. # --- doc ---
  46. springdoc:
  47. swagger-ui:
  48. enabled: true
  49. path: /swagger-ui.html
  50. tags-sorter: alpha
  51. operations-sorter: alpha
  52. show-extensions: true
  53. api-docs:
  54. enabled: true
  55. path: /v3/api-docs
  56. default-flat-param-object: true
  57. packages-to-scan: com.aitori.controller
  58. knife4j:
  59. production: ${PRODUCTION:false}
  60. enable: true
  61. setting:
  62. enable-footer: false
  63. basic:
  64. enable: true
  65. username: admin
  66. password: ${KNIFE4J_PASSWORD:Goodsense1}
  67. cors: false
  68. # --- forest ---
  69. forest:
  70. backend: okhttp3
  71. log-enabled: ${FOREST_LOG_ENABLED:true}
  72. log-request: true
  73. log-response-status: true
  74. log-response-content: true
  75. log-handler: com.aitori.aop.log.ForestLogHandler
  76. variables:
  77. model_health_host: https://api.sensenova.cn
  78. auth_host: https://sit-platform.senseauto.com
  79. product_name: sensechat
  80. # --- actuator ---
  81. management:
  82. server:
  83. port: 8090
  84. address: 0.0.0.0
  85. endpoints:
  86. web:
  87. base-path: /actuator
  88. exposure:
  89. # 暴露健康检查端点和Prometheus指标p
  90. include: health,info,metrics,prometheus
  91. exclude: shutdown,heapdump,threaddump
  92. endpoint:
  93. health:
  94. # 显示详细健康信息(生产环境建议设置为when-authorized)
  95. show-details: always
  96. # 启用Kubernetes探针支持
  97. probes:
  98. enabled: true
  99. # 健康检查组配置
  100. group:
  101. # 存活探针 - 检查应用是否运行
  102. liveness:
  103. include: ping,diskSpace
  104. # 就绪探针 - 检查应用是否准备好接收流量
  105. readiness:
  106. include: ping,db
  107. # 启用info端点
  108. info:
  109. access: unrestricted
  110. # 启用metrics端点
  111. metrics:
  112. access: unrestricted
  113. # 启用prometheus端点
  114. prometheus:
  115. access: unrestricted
  116. # Prometheus指标配置
  117. prometheus:
  118. metrics:
  119. export:
  120. enabled: true
  121. metrics:
  122. # 启用JVM指标
  123. enable:
  124. jvm: true
  125. system: true
  126. web: true
  127. jdbc: true
  128. hikaricp: true
  129. # 自定义标签
  130. tags:
  131. application: ${spring.application.name}
  132. environment: ${spring.profiles.active:dev}