java - Loading Spring Context Dynamically at Run-time in a Web Application -


I am converting a standard Java application that uses the Spring Framework in the web app. This application loads new spring references based on run-time parameters, which was done using the ClassPathXmlApplicationContext / FileSystemXmlApplicationContext .

So my question is how to do this in a web application that I already have on my web XM is configured and added to the Spring listeners:

  & lt; Listener & gt; & Lt; Audience category & gt; Org.springframework.web.context.ContextLoaderListener & lt; / Listener Category & gt; & Lt; / Listener & gt; Another problem, my deployment environment is at Tomek 5.5, where I am not able to see any logging during spring reference shipment which is wrong.   

If you actually want to load a configuration reference when your weblink is started You can configure your web.xml with the property placeholder for the reference name.

  & lt; Context-absolute & gt; & Lt; Ultimate Name & gt; ContextConfigLocation & lt; / Lastname & gt; & Lt; Ultimate Price & gt; Classpath: $ {my_context_file} & lt; / Super-valued & gt; & Lt; / Reference param & gt;  

Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

Which Python client library should I use for CouchdB? -