未经授权的春季启动管理员

Gir*_*hat 12 spring spring-boot microservices netflix-eureka spring-boot-admin

我想控制在Eureka服务器上运行的微服务.我使用spring-boot-admin,但是我在访问Trace,Log等信息时遇到错误...

我得到的错误是

错误:{"timestamp":1489052472862,"status":401,"error":"Unauthorized","message":"访问此资源需要完全身份验证.","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>
Run Code Online (Sandbox Code Playgroud)

并且以下属性均无效

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
Run Code Online (Sandbox Code Playgroud)

所有的终点都发生了同样的事情,如映射,环境和所有接受健康

jos*_*ste 39

设置management.security.enabled=falseapplication.properties将禁用端点上的安全性.

  • 这些端点需要什么授权? (6认同)
  • 此应用程序属性在最新的 spring-security 版本 (2.1+) 上不再可用。就像为当前读者提供的信息一样 (4认同)