Unauthorized in spring boot admin

后端 未结 4 1402
遥遥无期
遥遥无期 2021-02-07 22:38

I wanted to control the microservices that are running in the Eureka server. I used spring-boot-admin for this, but I am getting the error on accessing the information about the

4条回答
  •  礼貌的吻别
    2021-02-07 22:43

    I'm of the opinion that disabling the security to all sensitive endpoints isn't the way to go.

    I had this issue while accessing /metrics and apparently, I was missing the spring-boot-starter-security dependency:

    
        org.springframework.boot
        spring-boot-starter-security
    
    

    After adding the dependency to my pom.xml, and assuming that I have the following on my application.yml

    ...
    security:
        user:
            name: myActuatorUser
            password: myActuatorPwd
    ...
    

    I was able to access my /metrics endpoint.

提交回复
热议问题