This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Spring and the fly likes Reference spring modules Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Reference spring modules" Watch "Reference spring modules" New topic
Author

Reference spring modules

Vish Shukla
Ranch Hand

Joined: Oct 12, 2008
Posts: 111
Hi all,

I have 2 modularized spring projects, packaged as jar files, containing their own applicationContext.xml. I need to reference bean declarations of these xml in war file.

webapp.war
- WEB-INF
- dispatcher-servlet.xml (Need to reference bean1 and bean2 of module 1 & 2)
- lib
- module1.jar
- module1-applicationContext.xml
- bean1
- module2.jar
- module2-applicationContext.xml
- bean2

I tried referencing module1-applicationContext and module2-applicationContext from dispatcher-servlete.xml file with following.

<import resource="classpath:*-applicationContext.xml"/>

But when I try to access bean1 or bean2, getting no bean definition found exception. Can someone please suggest what kind of structure I should have to achieve this.

Thanks & Regards,
Vish Shukla


Thanks & Regards,
Vishal S Shukla (SCJP 93%, SCWCD 94%, SCBCD 100%)
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Reference spring modules
 
Similar Threads
Switching Modules in Strurts1.1
Modular java software using jars
Modular java software using jars
how to extract Bean ID in java for JMX
BeanUtils and null-properties.