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
这么配置就解决了。