I wrote a section class with @aspect and @Component annotations. Use @Configuration and @EnableAspectJAutoProxy annotations on Configuration classes.
No reaction was found during the test, and the problem was solved through online inquiry.
The scheme is as follows:
-
When using the EnableAspectJAutoProxy annotation, add the proxyTargetClass=true parameter, which is false by default. @EnableAspectJAutoProxy(proxyTargetClass=true)
-
If you are using an XML configuration file, use the following configuration items: