My project consists of multiple Spring subprojects:
- Service1
- Service2
- Service3
Every Service has multiple dependencies to other Beans inside, so every Service has an applicationContext.xml wiring the Service together.
I made every subproject an standalone maven build and i thought i can create a AllServicesTogether Application to wire those Service{1..3} together.
This works by adding maven dependencies to those Services.
<dependencies>
<dependency>
<groupId>org.myproject</groupId>
<artifactId>myproject-service{1..3}</artifactId>
<version>0.1-SNAPSHOT</version>
</dependency>
...
</dependencies>
But inside the AllServicesTogether Application, all wiring of the SubServices is lost. I guess Subservices aren't compiled with the Subservice ApplicationContext, but use the AllServicesTogether ApplicationContext.
The Idea is to encapsulate all wiring of SubSerivces and simply wire the AllServicesTogether by using:
<beans ..>
<bean class="org.myproject.service1.Service1"/>
<bean class="org.myproject.service1.Service2"/>
<bean class="org.myproject.service1.Service3"/>
</beans>
I created those subprojects from the bigger project spending hours on it. Is it possible to use this wiring method or do i need to include the context.xml's from all those Services?