开发者

I need Spring AOP pointcut annotation that matches this

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜