application.yml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #Web服务器端口
  2. # 服务器上的端口是 9400 本地启动的端口是 9403
  3. server:
  4. port: 9400
  5. debug: true
  6. spring:
  7. cloud:
  8. consul:
  9. discovery:
  10. prefer-ip-address: true # ip自动注册
  11. hostname: localhost # 配置实例地址
  12. port: ${server.port}
  13. health-check-path: /actuator/health # 检测实例健康
  14. health-check-interval: 10s # 每隔10s检查
  15. register: true # 自动注册
  16. service-name: ${spring.application.name} # 实例名称
  17. instance-id: ${spring.application.name}:${server.port}
  18. host: ${ApplicationCenter.url}
  19. port: ${ApplicationCenter.port}
  20. #kafka
  21. stream:
  22. kafka:
  23. binder:
  24. brokers: ${Kafka.brokers}
  25. replication-factor: 1
  26. bindings:
  27. userLogStreamConsumer-in-0:
  28. destination: UserLogStream
  29. group: ${project.artifactId}
  30. function: #注意:此处有调整
  31. definition: userLogStreamConsumer
  32. bus:
  33. enabled: true
  34. #配置zipkin链路追踪客户端
  35. zipkin:
  36. base-url: ${Zipkin.baseUrl}
  37. enabled: true
  38. sender:
  39. type: web
  40. sleuth:
  41. sampler:
  42. probability: ${Zipkin.sampler.probability}
  43. thymeleaf:
  44. suffix: .html
  45. mode: HTML
  46. prefix: classpath:/templates/
  47. cache: false
  48. encoding: UTF-8
  49. #调试或者输出日志
  50. logging:
  51. file:
  52. name: logs/${project.artifactId}.log