application.yml 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #Web服务器端口
  2. server:
  3. port: 10086
  4. #允许消息总线
  5. spring:
  6. cloud:
  7. consul:
  8. discovery:
  9. prefer-ip-address: true # ip自动注册
  10. hostname: localhost # 配置实例地址
  11. port: ${server.port}
  12. health-check-path: /actuator/health # 检测实例健康
  13. health-check-interval: 10s # 每隔10s检查
  14. register: true # 自动注册
  15. service-name: ${spring.application.name} # 实例名称
  16. instance-id: ${spring.application.name}:${server.port}
  17. host: ${ApplicationCenter.url}
  18. port: ${ApplicationCenter.port}
  19. #kafka
  20. stream:
  21. kafka:
  22. binder:
  23. brokers: ${Kafka.brokers}
  24. replication-factor: 1
  25. function:
  26. definition: userLogStreamConsumer
  27. bindings:
  28. userLogStreamConsumer-in-0:
  29. destination: UserLogStream
  30. group: ${project.artifactId}
  31. bus:
  32. enabled: true
  33. #配置zipkin链路追踪客户端
  34. zipkin:
  35. base-url: ${Zipkin.baseUrl}
  36. enabled: true
  37. sender:
  38. type: web
  39. sleuth:
  40. sampler:
  41. probability: ${Zipkin.sampler.probability}
  42. #调试或者输出日志
  43. logging:
  44. file:
  45. name: logs/${project.artifactId}.log
  46. #debug: true