如果在spring-boot 1.5.4.RELEASE 项目中没有spring-security模块依赖项,如何为执行器端点启用安全性
我在application.properties中添加了以下值,但是当我点击任何端点时,我得到错误
There was an unexpected error (type=Forbidden, status=403).
Access is denied. User must have one of the these roles: ACTUATOR
security.user.password=admin
security.user.name=admin
security.user.role=ACTUATOR
management.security.roles=ACTUATOR
我应该如何启用安全性?
答案 0 :(得分:1)
只需删除该值,即management.security.roles=