Search code examples
javaspring-bootnetflix-eurekaspring-cloud-netflix

How to disable login in Spring Boot Netflix' eureka?


I'm setting up a microservice architecture using Spring Boot and Eureka. I followed several tutorials. However, the Eureka server is showing a login when trying to open the dashboard. Also, registration of a client fails (I think because of the enabled security).

How can I disable the security?

This is my configuration:

eureka.instance.hostname=localhost
eureka.client.registerWithEureka=false
eureka.client.fetchRegistry=false
eureka.environment=dev

server.port=1112

I'm using a .properties file instead of .yml. What I tried is to add the property

security.basic.enabled=false

but the result was the same. So I tried to configure Spring Boot Security by myself but this caused 404 HTTP errors because the '/login'-controller was not found (and I don't want to develop this at the moment).


Solution

  • You have added two starter security dependencies in your Gradle. Those are configuring basic username password security. Please remove them.