java错误-The prefix "aop" for element "aop:aspectj-autoproxy" is not bound.

4人阅读 评论(0) 收藏 举报

配置springmvc的aop时出错:

当我向配置文件中添加:<aop:aspectj-autoproxy proxy-target-class="true"/> 时出错:

The prefix "aop" for element "aop:aspectj-autoproxy" is not bound.

org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 16 in XML document from class path resource [springmvc.xml] is invalid; nested exception is org.xml.sax.SAXParseException: The prefix "aop" for element "aop:aspectj-autoproxy" is not bound.

解决方法:

添加这些有关AOP的配置:

添加后如下面所示:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xmlns:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd 
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
 http://www.springframework.org/schema/aop 
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
">
查看评论

spring使用AOP时the prefix aop for element is not bound.和no declaration can be found错误

在使用标签时,xml编译错误报:the prefix aop for element "aop:config" is not bound错误 原因是:未在xml文件头部导入xmlns:aop=“ht...
  • u012817635
  • u012817635
  • 2016-04-14 10:17:58
  • 5652

The prefix "aop" for element "aop:aspectj-autoproxy" is not bound.

出现这个问题的原因是在头文件中没有添加“xmlns:aop”的命名申明,并在“xsi:schemaLocation”中指定aop配置的schema的地址     修改之后详细为:       xm...
  • dengmm
  • dengmm
  • 2011-11-01 22:03:00
  • 11102

shiro用户授权的时候,在springmvc.xml配置出现The prefix "aop" for element "aop:config" is not bound.

在对系统类的方法进行给用户授权的时候,在springmvc.xml配置文件中加入 proxy-target-class="true"> class="org.apache.shiro.sp...
  • u014206695
  • u014206695
  • 2017-01-23 23:00:53
  • 866

错误提示:The prefix "aop" for element "aop:config" is not bound.

--> 错误提示:The prefix "aop" for element "aop:config" is not bound.The prefix "tx" for element "tx:advi...
  • shangpusp
  • shangpusp
  • 2009-11-15 19:26:00
  • 6808

but no declaration can be found for element 'aop:aspectj-autoproxy'.

1、错误描述Multiple annotations found at this line: - cvc-complex-type.2.4.c: The matching wildcard is s...
  • you23hai45
  • you23hai45
  • 2015-12-09 14:11:42
  • 2618

<aop:config>报错

http://zhidao.baidu.com/link?url=jEW8-BuVE4HGVUGVmorSUQRMHyABZj11YOtwo9s6UbxvrhbJpPEvQy7ocf-GZeZ2I7l...
  • sinat_15114467
  • sinat_15114467
  • 2015-01-21 15:24:47
  • 361

springMVC- The prefix "mvc" for element "mvc:annotation-driven" is not bound 解决方法

在springmvc配置文件里面写默认的注解映射的支持的时候: The prefix "mvc" for element "mvc:annotation-driven" is not bound...
  • cl123cpzaihu
  • cl123cpzaihu
  • 2016-02-25 14:13:56
  • 2078

<aop:aspectj-autoproxy/>

报错: Multiple annotations found at this line:     - cvc-complex-type.2.4.c: The matching wildcard i...
  • sunhuwh
  • sunhuwh
  • 2014-05-07 18:44:23
  • 7740

ssm整合的配置文件

applicationContext.xml  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://ww...
  • rosener
  • rosener
  • 2017-02-15 18:40:51
  • 144

Spring4.3.x 浅析xml配置的解析过程(10)——解析aop命名空间之aspectj-autoproxy标签

概述Spring的AOP命名空间提供了、和三大标签。前两个标签的作用是想指定pointcut(切点)提供adivce(增强)处理,而的作用是对生命周期短的bean提供装饰,使生命周期短的bean能被生...
  • chyohn
  • chyohn
  • 2017-02-09 12:35:43
  • 1044
    个人资料
    持之以恒
    等级:
    访问量: 562
    积分: 130
    排名: 119万+
    文章分类
    文章存档