You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, To use @ConfigurationProperties() I need to make sure the child model classes should be inner classes. But if some classes are 3rd party external library, we cannot add them as inner classes in my main config.
Example:
Following example is a working one where I can define ChildConfig class as an inner class. But my question is what if this ChildConfig is coming from another dependency for my project where I no longer define the ChildConfig as a inner class. In such case how to get it working.
@ConfigurationProperties("myconfig")
class MyConfig {
@Getter
@Setter
private ChildConfig child;
@Getter
@Setter
public class ChildConfig {
private String name;
private String value;
}
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, To use @ConfigurationProperties() I need to make sure the child model classes should be inner classes. But if some classes are 3rd party external library, we cannot add them as inner classes in my main config.
Example:
Following example is a working one where I can define ChildConfig class as an inner class. But my question is what if this ChildConfig is coming from another dependency for my project where I no longer define the ChildConfig as a inner class. In such case how to get it working.
Beta Was this translation helpful? Give feedback.
All reactions