java 常见问题解决

来源:互联网 发布:淘宝双11倒计时代码 编辑:程序博客网 时间:2024/06/05 19:07

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

      出现这个问题的原因是在头文件中没有添加“xmlns:aop”的命名申明,并在“xsi:schemaLocation”中指定aop配置的schema的地址

    修改之后详细为:

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/aop 
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd">

The prefix "tx" for element "tx:annotation-driven " is not bound

添加

xmlns:tx="http://www.springframework.org/schema/tx "

cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration

解决办法:

xsi:schemaLocation="http://www.springframework.org/schema/beans
           http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
           http://www.springframework.org/schema/context
           http://www.springframework.org/schema/context/spring-context-2.5.xsd
           http://www.springframework.org/schema/aophttp://www.springframework.org/schema/aop/spring-aop-2.5.xsd
           http://www.springframework.org/schema/txhttp://www.springframework.org/schema/tx/spring-tx-2.5.xsd"
          

0 0
原创粉丝点击