spring_reference/V. Spring Boot Actuator/41.2. Customizing the manag...

8 lines
424 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

### 41.2. 自定义管理服务器的上下文路径
有时候将所有的管理端口划分到一个路径下是有用的。例如,你的应用可能已经将`/info`作为他用。你可以用`management.contextPath`属性为管理端口设置一个前缀:
```java
management.context-path=/manage
```
上面的application.properties示例将把端口从`/{id}`改为`/manage/{id}`(比如,/manage/info