通过指定 spring.application.admin.enabled 属性,可以使行政相关的特点 。这暴露了在 MBeanServer 平台上的 SpringApplicationAdminMXBean 。可以使用此功能来远程管理Spring Boot程序。这对任何服务包装器实现也是有用的 。
- 如果你想知道,应用程序正在运行在哪个HTTP端口 ,可以通过local.server.port获取。
- 启用此功能时,作为MBean暴露的关机方法应用要注意
原文:
23.10 Admin features
It is possible to enable admin-related features for the application by specifying thespring.application.admin.enabled property. This exposes theSpringApplicationAdminMXBeanon the platform MBeanServer. You could use this feature to administer your Spring Bootapplication remotely. This could also be useful for any service wrapper implementation.
![]() |
| If you want to know on which HTTP port the application is running, get the propertywith key |
![]() |
| Take care when enabling this feature as the MBean exposes a method to shutdown theapplication. |
没太看懂到底是干啥的,貌似可以用这个接口去实现一些管理发布的功能。,等哪天弄明白在回来修改。
Spring Boot应用远程管理
本文介绍如何通过设置spring.application.admin.enabled属性启用Spring Boot应用的远程管理功能。这将暴露SpringApplicationAdminMXBean到MBeanServer平台上,从而允许远程管理Spring Boot程序。此外,还可以通过local.server.port属性获取应用运行的HTTP端口。
![[Tip]](https://i-blog.csdnimg.cn/blog_migrate/39e3c5fe9839af51bb1cbceb08e26e37.png)
![[Note]](https://i-blog.csdnimg.cn/blog_migrate/7d220df75855358b310d334706ba496d.png)

910

被折叠的 条评论
为什么被折叠?



