Spring boot 在应用程序端口以外的其他端口上运行时,弹簧引导执行器出现禁止错误

Spring boot 在应用程序端口以外的其他端口上运行时,弹簧引导执行器出现禁止错误,spring-boot,spring-boot-actuator,actuator,Spring Boot,Spring Boot Actuator,Actuator,= 使用自定义spring安全配置访问在不同端口(应用程序端口除外)上运行的执行器时出现禁止的错误 application.properties file management.security.enabled=false management.context-path=/manage management.port=8085 server.context-path=/lnhcverifyhcp server.port=8090 spring启动版本-1.3.3.0版本 访问执行器url时

=

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

application.properties file

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

server.context-path=/lnhcverifyhcp
server.port=8090
spring启动版本-1.3.3.0版本


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

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

management.security.enabled=false
或者,设置您自己的用户名和密码:


请参见

我假设您正在使用弹簧执行器的弹簧安全性。因此,将致动器从安全装置中逃生的配置为:

endpoints:
  health: 
    sensitive:  false

management:
  security:
    enabled: false

希望这有帮助

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

您说过您正在使用定制的Spring安全配置,但没有提供详细信息。很有可能这就是问题所在,liesI使用了自定义配置,但我通过了执行器http.authorizeRequests().antMatchers(“/manafe/info”).permitAll()的安全验证;如果在和服务器端口相同的端口上运行,但如果在不同的端口上运行,则会出现禁止的错误。