spring cloud zuul “path”: “/actuator/routes” 404 not found

后端 未结 1 1515
难免孤独
难免孤独 2021-01-21 18:42

I work with Spring Cloud and I want to configure Zuul

application.yml of zuul service is

server:
  port: 5555

  #Setting logging levels
logging:
    le         


        
1条回答
  •  孤城傲影
    2021-01-21 19:23

    By default only the /health and /info endpoints are exposed.

    As the documentation indicates, you need to expose the endpoints:

    https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.0-Migration-Guide#endpoints

    So for a yaml file:

    management: 
      endpoints: 
        web: 
          exposure: 
            include: '*'
    

    or if you only want exposure routes:

    management: 
      endpoints: 
        web: 
          exposure: 
            include: 'routes'
    

    /actuator/routes will be available.

    0 讨论(0)
提交回复
热议问题