1

=

使用自定义弹簧安全配置访问在应用程序端口以外的不同端口上运行的执行器时出现禁止错误。

application.properties file

management.security.enabled=false
management.context-path=/manage
management.port=8085

server.context-path=/lnhcverifyhcp
server.port=8090

春季启动版本 - 1.3.3.RELEASE

访问执行器 url 时出现禁止错误

4

3 回答 3

1

我有同样的问题,我的 mcAfee 使用该端口。实际上 403 来自 McAfee。点击这个网址,看看你得到了什么 - http://localhost:8081/

于 2020-12-02T20:35:57.093 回答
0

我假设您将 Spring Security 与 Spring Actuator 一起使用。因此,将执行器从安全性中逃脱的配置是:

endpoints:
  health: 
    sensitive:  false

management:
  security:
    enabled: false

希望这有帮助!

于 2017-06-02T17:05:30.513 回答
-1

您可以通过将其添加到 application.properties 文件来禁用管理端口的安全性:

management.security.enabled=false

或者,设置您自己的用户名和密码:

请参阅https://docs.spring.io/spring-boot/docs/current/reference/html/production-ready-monitoring.html

于 2017-06-01T18:07:52.180 回答