當(dāng)前位置:
首頁 >
前端技术
> javascript
>内容正文
javascript
Spring Boot Actuator监控页面报错解决
生活随笔
收集整理的這篇文章主要介紹了
Spring Boot Actuator监控页面报错解决
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
今天在訪問Spring Boot Actuator監(jiān)控頁面的時候報錯了,之前都沒遇到這種情況,大概的意思就是無權(quán)限訪問
<html><body><h1>Whitelabel Error Page</h1><p>This application has no explicit mapping for /error, so you are seeing this as a fallback.</p><div id='created'>Tue Nov 07 14:14:32 CST 2017</div><div>There was an unexpected error (type=Unauthorized, status=401).</div><div>Full authentication is required to access this resource.</div></body> </html>然后我看了下控制臺,找到了有用的信息
說訪問端點信息需要認(rèn)證身份,請將management.security.enabled設(shè)置為false來關(guān)閉驗證功能
2017-11-07 14:13:19.742 INFO 11232 --- [nio-2101-exec-1] s.b.a.e.m.MvcEndpointSecurityInterceptor : Full authentication is required to access actuator endpoints. Consider adding Spring Security or set 'management.security.enabled' to false.解決方案當(dāng)然就是在屬性文件中加上management.security.enabled=false啦
那么為什么會出現(xiàn)這種情況呢,我看了下源碼,之前我用的spring boot是1.4.2版本的,源碼里面是沒有MvcEndpointSecurityInterceptor 這個攔截器的
目前用的spring boot是1.5.4,應(yīng)該是新版本加進(jìn)來的,這就是為什么之前沒有遇到過這個問題
關(guān)于actuator的使用可以查詢我的這篇文章:http://cxytiandi.com/blog/detail/8123
歡迎加入我的知識星球,一起交流技術(shù),免費學(xué)習(xí)猿天地的課程(http://cxytiandi.com/course)
PS:目前星球中正在星主的帶領(lǐng)下組隊學(xué)習(xí)Sentinel,等你哦!
總結(jié)
以上是生活随笔為你收集整理的Spring Boot Actuator监控页面报错解决的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: windows下wamp安装mongod
- 下一篇: OBS生命周期管理简介