@AspectJ pointcut for all methods inside package

前端 未结 3 1850
悲&欢浪女
悲&欢浪女 2021-02-01 15:45

I have this working code for a specific package, but i want to configure it for all controllers, service and dao packages Eg

3条回答
  •  执笔经年
    2021-02-01 16:11

    You just need to change your point cut to something like this :

    @Pointcut("within(com.abc.*)")
    

    Further reading - https://docs.spring.io/spring/docs/2.0.x/reference/aop.html

提交回复
热议问题