我正在使用Spring和GWT在多模块maven2项目中工作。假设我有两个子项目:服务和演示。 “服务”包含服务的实际实现,“演示”负责将其包装为GWT。WEB-INF外的Spring XML文件
我已成功加载了位于WEB-INF目录(与web.xml相同)中的Spring XML文件,但我遇到了应该从其他模块加载的XML文件的问题。
我的web.xml文件看起来是这样的:
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
classpath:/spring-presentation.xml, classpath:/spring-services.xml
</param-value>
</context-param>
这里spring-presentation.xml
是在演示项目和spring-services.xml
是在服务项目。 spring-services.xml
文件未加载。我错过了什么吗?
弹簧的services.xml提到它已经是服务项目中的src/main /资源目录,所以我想没有必要在项目的pom中明确声明它 – mgv 2010-07-19 18:44:18