java 常见问题解决

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

你可能感兴趣的:(java 常见问题解决)