11

我想控制在尤里卡服務器上運行的微服務。我用彈簧引導管理這一點,但我得到有關訪問跟蹤信息的錯誤,日誌等..未經授權在春季啓動管理員

我得到的錯誤是

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

我的依賴是

<dependency> 
     <groupId>org.springframework.boot</groupId> 
     <artifactId>spring-boot-starter-actuator</artifactId> 
    </dependency> 
    <dependency> 
     <groupId>org.springframework.cloud</groupId> 
     <artifactId>spring-cloud-starter-eureka</artifactId> 
    </dependency> 
    <dependency> 
     <groupId>org.springframework.boot</groupId> 
     <artifactId>spring-boot-starter-web</artifactId> 
    </dependency> 
    <dependency> 
     <groupId>org.springframework.boot</groupId> 
     <artifactId>spring-boot-starter-test</artifactId> 
     <scope>test</scope> 
    </dependency> 
    <dependency> 
     <groupId>de.codecentric</groupId> 
     <artifactId>spring-boot-admin-server</artifactId> 
     <version>1.4.3</version> 
    </dependency> 
    <dependency> 
     <groupId>de.codecentric</groupId> 
     <artifactId>spring-boot-admin-server-ui</artifactId> 
     <version>1.4.3</version> 
    </dependency> 

,並沒有低於性質的工作

endpoints.info.id=information 
endpoints.info.sensitive=false 
endpoints.info.enabled=true 
information.app.name=Actuator Example 
information.app.description=Actuator Example 
information.app.version=1.0.0 

,同樣的事情與人發生l終點類似映射,env和全部接受健康

回答

30

application.properties中設置management.security.enabled=false將禁用端點的安全性。

+0

非常感謝..#工作 –

+1

這些端點需要什麼授權? –