【发布时间】:2016-04-05 05:17:42
【问题描述】:
我阅读了How to shutdown a Spring Boot Application in a correct way?,所以我尝试使用http shutdown endpoints 来关闭我的spring boot 嵌入式tomcat 应用程序。
但我需要它只能由 localhost 访问,这样其他人就不会关闭我的应用程序。
我发现我可以使用management.address=127.0.0.1 t 不允许远程管理连接。
但是,如果我需要一些端点,例如 /health , /info 仍然可以远程访问?
有没有办法仅挂钩关闭端点,以便我可以检查请求者的 ip?
【问题讨论】:
-
你在使用 Spring 和嵌入式 tomcat 服务器吗?
标签: java spring spring-boot spring-boot-actuator