What is the default username when using Spring Security out-of-the-box?

What is the default username when using Spring Security out-of-the-box?

A) user
B) admin
C) root
D) spring

Answer:

A) user

Explanation:

When you add Spring Security to a Spring Boot project without any custom configuration, Spring Security provides a default username, which is “user”. The default password is generated and displayed in the console when the application starts. This setup allows you to quickly secure an application during development without needing to configure a custom authentication mechanism immediately.

You can customize the default username and password by defining your own authentication provider or using properties in the application’s configuration file.

Reference links:

https://www.javaguides.net/p/spring-security-tutorial.html

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top