Last active
March 14, 2018 22:19
-
-
Save bvulaj/56ca14ce40c399df46d4470bba0c099f to your computer and use it in GitHub Desktop.
Nested Configuration Objects w/o an Inner Class
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
props.nonInnerClass.name=foo | |
props.otherNonInnerClass.name=bar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class NonInnerClass { | |
private String name; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Component | |
@ConfigurationProperties("props") | |
public class NonInnerClassProperties { | |
@NestedConfigurationProperty | |
private NonInnerClass nonInnerClass; | |
@NestedConfigurationProperty | |
private NonInnerClass otherNonInnerClass; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment