java - 在tomcat上运行maven项目

标签 java spring maven tomcat

我正在使用 tomcat 7,当我运行我的 web 应用程序(maven 项目)时,它给了我这个错误:

Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath:hr_demo-security-context.xml]

有人可以帮忙吗?提前致谢。

hr_demo-security-context.xml:

<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/security" 
    xmlns:beans="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:context="http://www.springframework.org/schema/context" 
    xmlns:lang="http://www.springframework.org/schema/lang"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
        http://www.springframework.org/schema/security 
        http://www.springframework.org/schema/security/spring-security-3.0.xsd
        http://www.springframework.org/schema/context 
        http://www.springframework.org/schema/context/spring-context-3.0.xsd">

</beans:beans>

最佳答案

hr_demo-security-context.xml 存在语法问题。

关于java - 在tomcat上运行maven项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18530632/

相关文章:

java - 是否使用 Spring Solr 数据来实现像备份这样的灵活请求?

java - 在 Java while 循环条件中分配变量?

java - 对齐边缘效果

java - Thymeleaf + Spring MVC - 如何在表单上保留列表或枚举中的值?

java - 通过 userDetailsManager 更改用户角色

java - XWPF 列超出 docx 文档边界(Ubuntu 16.04 主机)

java - IntelliJ Java 编辑 .jsp 没有服务器重启

java - 在 Maven 测试阶段禁用 Log4J 日志

java - 在java Draw中扩散颜色

Java - JRadioButton 名称的 Action 监听器