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
I wanted to split configuration interfaces which would share the same property sources and their loading/merging strategy. For that I wanted to define parent interface specifying those sources. Unfortunately in that case the properties are not loaded.
For example, I have parent interface which specifies sources to property files:
Hi @abysas, this can be surely improved, but I think it is correct to specify the @Sources annotation in the sub interface. I could add the ability to include the @Sources from the super interface too as improvement.
@lviggiano, that would be great and IMHO it would allow to follow "don't repeat yourself" principle, don't you think :)
I guess such behavior could be default, unless subinterfaces were annotated with @Sources as well, which would effectively override the sources in super interface.
I wanted to split configuration interfaces which would share the same property sources and their loading/merging strategy. For that I wanted to define parent interface specifying those sources. Unfortunately in that case the properties are not loaded.
For example, I have parent interface which specifies sources to property files:
and sub interface which extends the parent:
I have property file reference.conf containing value:
pdfapi.copyUnmodified=true
And this code fails with NPE, unless I repeat @Config.Sources annotation on subinterface:
The text was updated successfully, but these errors were encountered: