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.