spring 如何配置多个应用,应用之间如何调用

来源:百度知道 编辑:UC知道 时间:2024/05/26 03:37:04
如题

public class ContextLoader
extends Object
Performs the actual initialization work for the root application context. Called by ContextLoaderListener and ContextLoaderServlet.

Looks for a "contextClass" parameter at the web.xml context-param level to specify the context class type, falling back to the default of XmlWebApplicationContext if not found. With the default ContextLoader implementation, any context class specified needs to implement ConfigurableWebApplicationContext.

Passes a "contextConfigLocation" context-param to the context instance, parsing it into potentially multiple file paths which can be separated by any number of commas and spaces, like "applicationContext1.xml, applicationContext2.xml". If not explicitly specified, the context implementation is supposed to use a default location (with XmlWebApplicationContext: "/WEB-INF/applicationContext.xml").

Note: In case of multiple config