如何排查并解决Spring Boot AOP切面失效的问题?
- 内容介绍
- 文章标签
- 相关推荐
本文共计587个文字,预计阅读时间需要3分钟。
检查Spring Boot启动类是否开启了扫描,需要检查以下注解:
- @SpringBootApplication- @ComponentScan(basePackages={com.zhangpu.springboot})- 以及Spring Boot默认开启的@EnableAspectJAutoProxy(值为true)
如果不放心,还可以添加@EnableAspectJAut。
本文共计587个文字,预计阅读时间需要3分钟。
检查Spring Boot启动类是否开启了扫描,需要检查以下注解:
- @SpringBootApplication- @ComponentScan(basePackages={com.zhangpu.springboot})- 以及Spring Boot默认开启的@EnableAspectJAutoProxy(值为true)
如果不放心,还可以添加@EnableAspectJAut。

