Spring AOP - why do i need aspectjweaver?

前端 未结 5 1496
无人及你
无人及你 2020-12-13 06:25

i wrote a very simple Aspect with Spring AOP. It works, but i have some problems understanding what is really going on. I don\'t understand why i have to add the aspectjweav

5条回答
  •  执笔经年
    2020-12-13 06:59

    I recently had a similar question Why does spring throw an aspectj error if it does not depend on aspectj?

    To use Spring AoP without an AspectJ dependency it must be done in xml. The annotations are a part of AspectJ.

    Also, the really cool expression language is only supported by AspectJ. So you have to define explicit point-cuts. See Section 6.3.2. Declaring a pointcut: http://static.springsource.org/spring/docs/2.0.x/reference/aop.html section

    I'm still having trouble finding any elaborate documentation on this technique.

提交回复
热议问题