遇到这个问题,有几种可能:

1、项目打包的时候 mapping.xml 没有打包进去

 

2、项目打包的时候,配置文件没有打包进去

检查:

看看项目的“WEB-INF/classes”目录下,有没有配置文件。

完整目录示例:E:\Deploy\apache-tomcat\webapps\ROOT\WEB-INF\classes

 

3、启用事务处理,但没有做AOP相关配置

参考:

Consider injecting the bean as one of its interfaces or forcing the use of CGLib-based proxies by setting proxyTargetClass=true on @EnableAsync and/or @EnableCaching.


本文转载:CSDN博客