title: Initialize Spring Application Context for spring projects packaged as a jar
body: <p>We have several java projects.  Most of them are built with Struts 2.0 framework and few built with Spring 3.2.  We want to consolidate all the back-end integration service into a separate project using spring 3.2 and import this jar file on all the projects.  Here are my questions</p>
  
  <ol>
  <li>What is the best way to initialize spring application-context for a jar based spring project?  This jar is utilized by multiple web-project that are built using Struts and other non spring MVC frameworks.   </li>
  </ol>
  
  <p>I read <a href="https://stackoverflow.com/questions/19116168/how-to-package-spring-based-library-for-reuse">How to package spring based library for reuse?</a>. However, this question didn't answer on how to auto-load the application context when you a call a Service from the built spring-example.jar file.  </p>
  
  <p>For example.  I have a WeatherService.java class in spring-framework.jar file.  I want to import the spring-framework.jar file into another Struts-MVC based application and call WeatherService.java from an Action Class.  I want the spring bean configuration to initiate automatically when calling the WeatherService.  </p>