【发布时间】:2015-11-07 19:58:57
【问题描述】:
我正在尝试使用ContextLoaderListener 添加security-config.xml 文件和web.xml,但在尝试为security-config.xml 添加<param-value> 后出现错误提示:
发现以元素“param-value”开头的无效内容。不 此时需要子元素。
jpaContext.xml 用于 JPA 配置,所以我无法删除它。这个时候我该怎么办?
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:/jpaContext.xml</param-value>
<param-value>/WEB-INF/config/security-config.xml</param-value>
</context-param>
【问题讨论】:
-
你在 jpaContext.xml 和 security-config.xml 中都有'dataSource'吗?
标签: java xml spring spring-mvc spring-security