1.在使用springboot admin 整合nacos时发现问题,springboot admin server访问admin client的默认地址为http://ip:port/actuator

但是在我们的大部分项目中都会配置一个servlet.context-path,此时admin server默认的访问地址就不对了,然后就回报错,如下图

springboot admin 整合nacos,context-path问题

 

 

 2.此时修改nacos的配置,增加context-path相关的配置

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

3.重启项目发现admin显示正常

springboot admin 整合nacos,context-path问题

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-08-12
  • 2022-01-28
  • 2022-12-23
  • 2022-12-23
  • 2021-11-25
  • 2021-04-30
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-15
  • 2022-12-23
  • 2021-07-22
  • 2021-12-20
  • 2023-04-10
相关资源
相似解决方案