My (maven based) project is built from several modules. Basically, there is a Core module and several modules that use it to provide various services outside. The “glue” between these modules is the “parent” module. The "parent" module must not contain any code. Something like that: 
What I would like to do is use Spring IoC to input / prepare the main parts in the Service part. But I can not find a way to configure this. Or at least I cannot find a way to avoid redundant IoC configuration in parts of the Service.
More specifically — using the example from the Spring documentation — suppose it will be a configuration for one of the service modules — how could I move example.SimpleMovieCatalog configuration details to the Core module without losing the ability to embed them in one of the sibling modules?
<?xml version="1.0" encoding="UTF-8"?> <beans...> <context:annotation-config/> <bean class="example.SimpleMovieCatalog"> <qualifier value="main"/> </bean> <bean class="example.SimpleMovieCatalog"> <qualifier value="action"/> </bean> <bean id="movieRecommender" class="example.MovieRecommender"/> </beans>
source share