Issue
I am building a Spring project, and when I run it, in browser at localhost:8080 I get this random Login field. How do I get rid of this? I have no html,css/front-end written whatsoever. When I try to go to my addresses like /all, it just redirects me to /login
href="https://imgur.com/a/PHrcxvn" rel="nofollow noreferrer">Login field
Solution
I assume this is spring boot and you are using spring-boot-starter-security
along with spring-boot-starter-web
, by default you will be redirected to this security page. To login you can use user
as the username and the password will be printed in your console
INFO org.springframework.boot.autoconfigure.security.servlet.UserDetailsServiceAutoConfiguration.getOrDeducePassword -
Using generated security password:
See here how to disable the login: How to disable spring-security login screen?
Answered By - user1738539
Answer Checked By - Willingham (JavaFixing Volunteer)