To externalize configuration properties in Spring Boot, the _____ annotation can be used on a configuration properties class.
- @AutowiredConfig
- @ConfigurationProperties
- @ExternalizedConfig
- @PropertySource
To externalize configuration properties in Spring Boot, the "@ConfigurationProperties" annotation is used on a configuration properties class. This annotation binds properties from the configuration files (such as "application.yml" or ".properties") to fields in the configuration class, allowing easy access to configuration values.
Loading...
Related Quiz
- How can you create a custom Auto Configuration in Spring Boot?
- In Spring Boot, how can you implement a cache-aside caching strategy effectively?
- In Spring Boot, which annotation is used to define a class as a global advice for all controllers?
- Your application has several Auto Configurations, and you notice that some beans are being overridden unintentionally. How would you resolve the bean overriding issue and ensure that the intended beans are registered?
- What is the primary purpose of using Mockito in unit testing?