My main Spring XML configuration file indicates the following:
<context:component-scan base-package="com.application" />
Components detected during this scan may be in one of many jar files in my class path. I would like to have additional Spring XML configuration files in each jar file that provide more information about each individual service / component (maybe some properties and much more), but I do not want these things to be closely linked to my main configuration file applications.
Is there a way to do this, or am I out of luck?
Ideally, I would like to somehow auto-detect the existence of an XML file in a JAR file based on the name and / or location in the JAR file.
I know that some things like this can be done with META-INF, but this is far beyond my competence.
source share