启动Tomcat时报错,通配符的匹配很全面, 但无法找到元素 'tx:annotation-driven' 的声明,报错如下

1.从报错可以看到找不到元素   tx:annotation-driven 说明可能spring-tx-x.x.xsd结构定义的文件引用的优点问题,原本的application-spring.xml配置文件如下:

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

  

修改之后的配置文件如下:

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

问题便解决了,大家可以尝试一下。

参考链接

https://www.cnblogs.com/Chestnuts/p/7510524.html

https://bbs.csdn.net/topics/392162821  

通配符的匹配很全面, 但无法找到元素 'tx:annotation-driven' 的声明的更多相关文章

  1. 通配符的匹配很全面, 但无法找到元素 'tx:annotation-driven'

    配置Spring时出现如题这个错误,下面是xml的内容 <?xml version="1.0" encoding="UTF-8"?> <bea ...

  2. Tomcat启动报错:“通配符的匹配很全面, 但无法找到元素 'tx:annotation-driven' 的声明“

    从报错信息就可以明显察觉到是xml配置文件出现的问题 <?xml version="1.0" encoding="UTF-8"?> <bean ...

  3. springMVC:通配符的匹配很全面, 但无法找到元素 'mvc:annotation-driven' 的声明

    转自:http://blog.csdn.net/tolcf/article/details/50845483 报错信息:通配符的匹配很全面, 但无法找到元素 'mvc:annotation-drive ...

  4. nested exception is org.xml.sax.SAXParseException; lineNumber: 8; columnNumber: 56; cvc-complex-type.2.4.c通配符的匹配很全面, 但无法找到元素 'dubbo:application' 的声明

    严重: Exception sending context initialized event to listener instance of class org.springframework.we ...

  5. 通配符的匹配很全面, 但无法找到元素 'cache:advice' 的声明

    EB-INF\classes\spring-jdbc.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineN ...

  6. idea调试SpringMvc, 出现:”通配符的匹配很全面, 但无法找到元素 'mvc:annotation-driven' 的声明“错误的解决方法

    调试json格式输出,出现以下错误: HTTP Status 500 - Servlet.init() for servlet HelloDispatcher threw exception   ty ...

  7. 通配符的匹配很全面, 但无法找到元素 'mvc:annotation-driven' 的声明

    通配符的匹配很全面, 但无法找到元素 'mvc:annotation-driven' 的声明 错误原因是springmvc中的约束信息不对 <beans xmlns="http://w ...

  8. dubbo 常见错误 通配符的匹配很全面, 但无法找到元素 'dubbo:application' java.lang.reflect.MalformedParameterizedTypeException 通配符的匹配很全面, 但无法找到元素 'dubbo:application' 的声明。 Unsupported major.minor version 52.0 (unable to l

    dubbo 常见错误 1. Caused by: java.lang.reflect.MalformedParameterizedTypeException 启动时报错,原因是dubbo 依赖 spr ...

  9. Spring:通配符的匹配很全面, 但无法找到元素 XXXXX' 的声明

    问题:配置Spring的时候容易发生如题的这样一个经常性的错误,错误如下(以context为例) org.springframework.beans.factory.xml.XmlBeanDefini ...

随机推荐

  1. 一套海量在线用户的移动端IM架构设计实践分享(含详细图文)(转)

    1.写在前面 1.1.引言 如果在没有太多经验可借鉴的情况下,要设计一套完整可用的移动端IM架构,难度是相当大的.原因在于,IM系统(尤其是移动端IM系统)是多种技术和领域知识的横向应用综合体:网络编 ...

  2. js 改变颜色值

    /** * 获取颜色值 */ const color2RGB = (color) => { if (typeof color !== 'string' || (color.length !== ...

  3. avalon2学习教程 03数据填充

    数据填充是一个模版最基础的功能,直接从JSON(vm)取出数据,放到适当的位置上.在静态模板中,不区分文本与HTML,只看你的字符串是否有< >来决定生成文本节点与元素节点.但MVVM中, ...

  4. JAVAWEB 一一 SpringMVC(注解)

    web.xml <?xml version="1.0" encoding="UTF-8"?> <web-app version="2 ...

  5. Jsp基本语法 第二章

    今天是星期天,我学习了关于Jsp的一些基本页面元素 首先学习了一些基本页面注释 1.HTML的注释 <!-- htmI注释-->//    客户端可见 2.JSP的注释:  <%-- ...

  6. 小程序:pages/index/index/出现脚本错误或未正确调用Page()

    第一次尝试玩小程序,配置好以后报错.pages/index/index/出现脚本错误或未正确调用Page() 才发现解决的方式是:新建的文件默认是没有page()的,所以你需要在.js文件中加上Pag ...

  7. StarRatingBar星星切换动画《IT蓝豹》

    StarRatingBar星星切换动画 StarRatingBar星星切换动画,很久没有学习一下这个RatingBar了,今天来看看这个RatingBar的动画切换效果,本例子主要是RatingBar ...

  8. 吴裕雄 python神经网络(6)

    import randomimport numpy as npnp.random.randint(0,49,3) ##required libarariesimport tensorflow as t ...

  9. &符号 (弃用引用传参了,不要用!!)

    写法一 $age = function grow($age) { $age += ; return $age; } echo grow($age) echo $age 写法二 $age = funct ...

  10. Vue sync修饰符的使用

    父子组件传值,父组件可以给子组件传值,但是子组件是不能修改组件提供的值,这里vue提供了sync修饰符,以前父组件点击子组件显示,子组件关闭按钮,父组件再点击子组件就无法让子组件显示.因为子组件点击关 ...