@NestedConfigurationProperty: Difference between revisions
Jump to navigation
Jump to search
(Created page with "=Internal= * Spring Boot Property Injection * @ConfigurationProperties") |
No edit summary |
||
Line 3: | Line 3: | ||
* [[Spring_Boot_Property_Injection#.40NestedConfigurationProperty|Spring Boot Property Injection]] | * [[Spring_Boot_Property_Injection#.40NestedConfigurationProperty|Spring Boot Property Injection]] | ||
* [[@ConfigurationProperties]] | * [[@ConfigurationProperties]] | ||
=Example= | |||
<syntaxhighlight lang='java'> | |||
@Component | |||
@ConfigurationProperties(prefix = "example.cryptm") | |||
public class CryptmPropertyConfiguration { | |||
private String masterKeyArn; | |||
... | |||
@NestedConfigurationProperty | |||
private DataKeyCachingConfiguration dataKeyCaching; | |||
... | |||
} | |||
</syntaxhighlight> |
Revision as of 23:41, 2 January 2019
Internal
Example
@Component
@ConfigurationProperties(prefix = "example.cryptm")
public class CryptmPropertyConfiguration {
private String masterKeyArn;
...
@NestedConfigurationProperty
private DataKeyCachingConfiguration dataKeyCaching;
...
}