application.yml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. server:
  2. port: 8004
  3. spring:
  4. application:
  5. name: ai-service
  6. # 数据库配置(Druid)
  7. datasource:
  8. type: com.alibaba.druid.pool.DruidDataSource
  9. druid:
  10. driver-class-name: org.postgresql.Driver
  11. url: jdbc:postgresql://localhost:5432/lingyue_zhibao
  12. username: ${DB_USERNAME:postgres}
  13. password: ${DB_PASSWORD:postgres}
  14. initial-size: 5
  15. min-idle: 5
  16. max-active: 20
  17. max-wait: 60000
  18. time-between-eviction-runs-millis: 60000
  19. min-evictable-idle-time-millis: 300000
  20. validation-query: SELECT 1
  21. test-while-idle: true
  22. test-on-borrow: false
  23. test-on-return: false
  24. pool-prepared-statements: true
  25. max-pool-prepared-statement-per-connection-size: 20
  26. filters: stat,wall,slf4j
  27. # MyBatis Plus配置
  28. mybatis-plus:
  29. mapper-locations: classpath*:mapper/**/*Mapper.xml
  30. type-aliases-package: com.lingyue.ai.entity
  31. configuration:
  32. map-underscore-to-camel-case: true
  33. log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl
  34. global-config:
  35. db-config:
  36. id-type: assign_uuid
  37. # Nacos配置
  38. cloud:
  39. nacos:
  40. discovery:
  41. server-addr: ${NACOS_SERVER_ADDR:localhost:8848}
  42. namespace: public
  43. group: DEFAULT_GROUP
  44. # DeepSeek API配置
  45. deepseek:
  46. api-url: ${DEEPSEEK_API_URL:https://api.deepseek.com}
  47. api-key: ${DEEPSEEK_API_KEY:}
  48. timeout: 30000
  49. # 日志配置
  50. logging:
  51. level:
  52. root: INFO
  53. com.lingyue: DEBUG