开发者

I need Spring AOP pointcut annotation that matches this

开发者 https://www.devze.com 2023-03-18 11:29 出处:网络
any public method, any return type, partial class name match, any method, taking session as the first arg.

any public method, any return type, partial class name match, any method, taking session as the first arg.

I came up with @Before(value="execution(public * *ServiceImpl.*(*.PlayerSession,..))")

this doesn't work. but when I change it to @Before(va开发者_开发知识库lue="execution(public * com.mycompany.mypkg.IdServiceImpl.*(*.PlayerSession,..))") it works. can I get an explanation for this.


Try to use this instead:

@Before(value = "execution(public * *..*ServiceImpl.*(*..PlayerSession, ..))")

you need to add *.. so that spring would search for your *ServiceImpl service in any package

note: just for convenience I have added it also before your PlayerSession object

0

精彩评论

暂无评论...
验证码 换一张
取 消