##配置实现Spring Aop时,出现以下错误
1.出现错误: ‘https://www.springframework.org/schema/beans/spring-aop.xsd’, 原因为 1) 无法找到文档; 2) 无法读取文档; 3) 文档的根元素不是 xsd:schema。
原因:写错,应该是https://www.springframework.org/schema/aop/spring-aop.xsd (注意黑体加粗地方),粗心大意写错了。
其中也会出现 找不到 “beans”的错误,但好像就是上面的原因。
完整:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop.xsd">