其实网上关于这个问题,讨论很多,对于一个初学者来说也是很有可能会遇到的问题,像我一样,也是把网上的方式试了很多,最终还是通知自己解决。虽说不是什么大问题,但是这种问题肯定也会浪费你不少时间。好吧,下面开始说说我提示这个错误的原因。
1、首先这个提示肯定是在于XML的配置,我当时是这么写的:
<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: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
https://www.springframework.org/schema/aop/spring-aop.xsd
https://www.springframework.org/schema/context
https://www.springframework.org/schema/context/spring-context.xsd">
其实有一个不起眼的小细节,我把 https://www.springframework.org/schema/context这一句,多加了个"S",因此导致没有引用成功,希望大家也可以试试这个方法,反正我就是这个原因导致的。