application.yml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. server:
  2. port: 8002
  3. spring:
  4. application:
  5. name: document-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.document.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. properties:
  38. hibernate:
  39. dialect: org.hibernate.dialect.PostgreSQLDialect
  40. # Nacos配置
  41. cloud:
  42. nacos:
  43. discovery:
  44. server-addr: ${NACOS_SERVER_ADDR:localhost:8848}
  45. namespace: public
  46. group: DEFAULT_GROUP
  47. # 日志配置
  48. logging:
  49. level:
  50. root: INFO
  51. com.lingyue: DEBUG