Shiro Authorization Permission check using Annotation not working

后端 未结 6 1877
悲&欢浪女
悲&欢浪女 2020-12-08 17:49

Platform: Shiro 1.1.0, Spring 3.0.5

I\'m trying to secure the MVC Controller methods using Shiro annotation. However something is wrong with annotations. Regular cal

6条回答
  •  借酒劲吻你
    2020-12-08 18:31

    If you're avoiding Spring XML and using primarily Java and annotation configuration, the easiest way to fix this is to add

    @Scope(proxyMode = ScopedProxyMode.TARGET_CLASS)
    

    to all your @Controller classes. You need cglib on the classpath.

提交回复
热议问题