SpringBoot监控管理模块actuator没有权限的问题解决⽅
法
SpringBoot 1.5.9 版本加⼊actuator依赖后,访问/beans 等敏感的信息时候报错,如下
Tue Mar 07 21:18:57 GMT+08:00 2017
There was an unexpected error (type=Unauthorized, status=401).家长对老师说的话
Full authentication is required to access this resource.
会员活动肯定是权限问题了。有两种⽅式:
1.关闭权限:application.properties添加配置参数
abled=fal
2.添加权限(未测试):
<dependency>
<groupId>org.springframework.boot</groupId>
正颜厉色
<artifactId>spring-boot-starter-curity</artifactId>
</dependency>
鸡毛扫在property中配置权限
ID描述敏感
(Sensitive)
autoconfi g 显⽰⼀个auto-configuration的报告,该报告展⽰所有auto-configuration候选者及它们被
应⽤或未被应⽤的原因
true
beans显⽰⼀个应⽤中所有Spring Beans的完整列表true configpr
ops
显⽰⼀个所有@ConfigurationProperties的整理列表true dump执⾏⼀个线程转储true env暴露来⾃Spring ConfigurableEnvironment的属性true
health 展⽰应⽤的健康信息(当使⽤⼀个未认证连接访问时显⽰⼀个简单的'status',使⽤认证连
湖北干部在线学习
接访问则显⽰全部信息详情)
八年级上册历史fal
info显⽰任意的应⽤信息fal
metrics展⽰当前应⽤的'指标'信息true
mapping
s
显⽰⼀个所有@RequestMapping路径的整理列表true
shutdow
n
允许应⽤以优雅的⽅式关闭(默认情况下不启⽤)true登鹳雀楼的意思全解
trace显⽰trace信息(默认为最新的⼀些HTTP请求)true
我的妈妈二年级总结
以上所述是⼩编给⼤家介绍的SpringBoot 监控管理模块actuator没有权限的问题解决⽅法,希望对⼤家有所帮助,如果⼤家有任何疑问请给我留⾔,⼩编会及时回复⼤家的。在此也⾮常感谢⼤家对⽹站的⽀持!