1. 程式人生 > >關於springboot-actuator監控的401無許可權訪問

關於springboot-actuator監控的401無許可權訪問

今天心血來潮看一下spring監控
訪問/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.

application.properties新增配置引數

management.security.enabled=false

ID 描述 敏感(Sensitive)
autoconfig 顯示一個auto-configuration的報告,該報告展示所有auto-configuration候選者及它們被應用或未被應用的原因 true
beans 顯示一個應用中所有Spring Beans的完整列表 true
configprops 顯示一個所有@ConfigurationProperties的整理列表 true
dump 執行一個執行緒轉儲 true
env 暴露來自Spring ConfigurableEnvironment的屬性 true
health 展示應用的健康資訊(當使用一個未認證連線訪問時顯示一個簡單的’status’,使用認證連線訪問則顯示全部資訊詳情) false
info 顯示任意的應用資訊 false
metrics 展示當前應用的’指標’資訊 true
mappings 顯示一個所有@RequestMapping路徑的整理列表 true
shutdown 允許應用以優雅的方式關閉(預設情況下不啟用) true
trace 顯示trace資訊(預設為最新的一些HTTP請求) true

網上找不到答案還是要看官方文件