1. 程式人生 > >Spring-cloud-config-client更新報錯Full authentication is required to access this resource

Spring-cloud-config-client更新報錯Full authentication is required to access this resource

{
    "timestamp":1514441597157,
    "status":401,
    "error":"Unauthorized",
    "message":"Full authentication is required to access this resource.",
    "path":"/refresh"
}

這是由於client服務開啟了許可權攔截,在配置檔案bootrap.properties中增加一句忽略即可:

management.security.enabled=false

注意,pom檔案加上Springcloud的健康監控的依賴包:

<dependency
>
<groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency>