实现Spring 学习,看松哥这一篇万余字干货就够了!中“XML配置AOP”代码出现以下错误
Exception in thread "main" org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.example.advicedemo2.MyCalculatorImp1' available;
这类错误表示的是未扫描到当前bean,百度之后发现应该是没有扫描包
在application.xml中加入以下代码
<context:component-scan base-package="com.example.advicedemo2" use-default-filters="true"/>
问题解决