-
Quality Risk
-
Resolution: Not a Bug
-
Minor
-
None
-
None
I've noticed that three additional config sources provided by EAP7-1386 are always registered among config sources, even they are empty. I'll probably reject this one myself soon
as I still have to look into the implementation of SPI for mp config, so I can assume that this is just out of box behaviour we have no control over.
Test with a simple servlet from helloworld quickstart with following addition:
ConfigProvider.getConfig().getConfigSources().forEach(configSource -> {
System.out.println("=================================");
System.out.println(configSource.getName());
System.out.println(configSource.getOrdinal());
System.out.println("Property names: " + configSource.getPropertyNames().stream().collect(Collectors.joining(", ")));
});
output:
================================= SysPropConfigSource 400 [Standalone], awt.toolkit, ... ================================= EnvConfigSource 300 PATH, INVOCATION_ID, ... ================================= null:null:ServletConfigSource 60 ================================= null:null:FilterConfigSource 50 ================================= null:ServletContextConfigSource 40
Notice that PropertiesConfigSource is missing there as none was put to classpath. On the other hand
{PropertiesConfigSource}is present once added to classpath, even it is empty.
... ================================= PropertiesConfigSource[source=vfs:/content/helloworld.war/WEB-INF/classes/META-INF/microprofile-config.properties] 100 Property names: ================================= null:null:ServletConfigSource 60 Property names: ================================= null:null:FilterConfigSource 50 Property names: ================================= null:ServletContextConfigSource 40 Property names:
As stated before, I'd probably close this one myself once I'll take deeper look into it.