ApplicationContext ctx = ApplicationContextProvider.getApplicationContext();
If you have used Sproing to start the application and/or load Spring, you will automatically have access to this class. If you want to use this feature of Sproing in a web application, all you need to do is declare the ApplicationContextProvider as a spring bean in your spring xml file ie
<bean id="applicationContextProvider" class="uk.org.sith.sproing.spring.ApplicationContextProvider"/>
Sproing version 0.3.1alpha is available now from Sith Open Source
No comments:
Post a Comment