How can you configure a Spring Boot application to act as an OAuth2 Resource Server?
- Using @EnableResourceServer annotation.
- Adding the @EnableOAuth2Resource annotation.
- Creating a new SecurityConfig class.
- Modifying the application.properties file.
To configure a Spring Boot application as an OAuth2 Resource Server, you typically use the @EnableResourceServer annotation. This annotation enables OAuth2 security features in your application, allowing it to validate access tokens and handle resource requests securely. The other options are not standard practices for configuring a Spring Boot application as an OAuth2 Resource Server.
Loading...
Related Quiz
- How can you inject mock beans into the Spring Application Context when writing a test in Spring Boot?
- You have a Spring Boot application that integrates with several external services. How would you structure your tests to ensure that the interactions with external services are correctly handled, without actually interacting with the real services during the tests?
- How can you create a custom Auto Configuration in Spring Boot?
- How does the @ConditionalOnClass annotation influence the application of auto-configuration in Spring Boot?
- How does WebFlux differ from the traditional Spring MVC framework in handling HTTP requests?