@ConfigurationProperties: Difference between revisions
Jump to navigation
Jump to search
Line 6: | Line 6: | ||
* [[Spring_Boot_Property_Injection#.40ConfigurationProperties|Spring Boot Property Injection]] | * [[Spring_Boot_Property_Injection#.40ConfigurationProperties|Spring Boot Property Injection]] | ||
* [[@NestedConfigurationProperty]] | |||
=Overview= | =Overview= |
Latest revision as of 18:02, 13 December 2018
External
Internal
Overview
@ConfigurationProperties is a Spring Boot annotation that, once placed on a bean, specifies that the properties of that bean ban be injected from properties present in the Spring environment.
@Component
@ConfigurationProperties(prefix = "playground.spring.pi")
public class ... {
}
The 'prefix' attribute defines the namespace for the configuration properties exposed by the component.