I am trying to use Spring Security 3 with Struts 2 and Spring DI. I put hasRole() annotation in my code and it is working fine but hasPermission() annotation is not working.
It does not work, because Spring AOP can only incercept calls between beans, but not if you invoke a method of the same bean.
So either you move the isAccessible
Method to an other bean, or use use AspectJ instead of Spring Proxy AOP.
An other idea would be using the permission evaluation directly, instead of having the annotated method. (But I do not know exactly how this can be done.)