When you create a new Spring Boot web application and include Spring Security starter, what does the auto-configuration do by default?
Think about what Spring Security does out of the box to protect your app.
By default, Spring Security auto-configuration secures all HTTP endpoints with basic authentication. It generates a default password printed in the console.
You want to disable Spring Security auto-configuration completely. Which of the following code snippets achieves this?
Look for the annotation attribute that excludes auto-configuration classes.
Using @SpringBootApplication(exclude = SecurityAutoConfiguration.class) disables Spring Security auto-configuration.
When Spring Security auto-configures your app, it prints a default password in the console. What is the format of this password?
Check the console output when you run a Spring Boot app with Spring Security starter.
The default password is a random UUID string generated each time the app starts.
You want to disable the default generated password and allow users to set their own. Which property disables the default password generation?
Setting this property to an empty value disables the generated password.
Setting spring.security.user.password= disables the default generated password and requires you to set your own password.
Spring Security auto-configuration sets up a filter chain for HTTP requests. Which of the following correctly describes the order of these filters?
Think about how Spring Security manages context, authentication, exceptions, and authorization.
The correct filter order is: SecurityContextPersistenceFilter loads the security context, then BasicAuthenticationFilter processes login, ExceptionTranslationFilter handles exceptions, and FilterSecurityInterceptor enforces access control.