springboot admin 集成nacos, context-path导致的问题解决


要将微服务加入到springboot admin的监控中心,如果没有配置server.servlet.context-path的话,就一切ok,但是如果配置了呢?

 

从springboot admin找到微服务,什么都看不到。

 

 

上图可以看到,我们的健康监控没有项目路径,所以导致找不到。

 

那么问题来了,如何配置项目路径到spring boot admin中呢。

 

spring: 
  cloud:
     nacos:
      discovery:
        metadata:
          management:
            context-path: ${server.servlet.context-path}/actuator

 

这么配置就解决了。  

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM