可以在Spring Boot Admin Server的application.yml文件中配置server.servlet.context-path属性,该属性会将所有的请求路径都添加一个前缀。 例如:

server:
  servlet:
    context-path: /monitor

这样就会将所有请求路径都添加"/monitor"前缀,包括Spring Boot Admin Server自带的接口。所以原来的接口ip+port+"/applications"就会变成ip+port+"/monitor/applications"。

怎么只在springboot admin的界面自带的接口的路径前添加前缀?如原来的接口是ip+port+applications拼接现在想换成统一加前缀monitor变成ip+port+monitorapplications该怎么实现?只在admin的自带接口添加前缀使用yaml配置格式

原文地址: https://www.cveoy.top/t/topic/Lax 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录