Hi Brian, I used @RequiresAuthentication in java source code.
From shiro document I found content as below, This requires Shiro’s Spring AOP integration to scan for the appropriate annotated classes and perform security logic as necessary. But I don't know how to enable "shiro's spring AOP integration". Is there any procedure about this? Thanks, Jared, (韦煜) Software developer Interested in open source software, big data, Linux ________________________________ From: Brian Demers <[email protected]> Sent: Wednesday, July 5, 2017 11:22:01 PM To: [email protected] Subject: Re: One question about shiro annotations with spring What do your annotations look like ? On Tue, Jun 27, 2017 at 3:33 AM, Yu Wei <[email protected]<mailto:[email protected]>> wrote: Hi guys, Should shiro annotations work with spring controller or spring services? When I configured filters in applicationContext.xml as below, everything works well. <property name="filters"> <util:map> <entry key="authc"> <bean class="org.apache.shiro.web.filter.authc.PassThruAuthenticationFilter"/> </entry> </util:map> </property> <property name="filterChainDefinitions"> <value> /school/** = authc /user/** = authc, roles[888888] /role/** = authc, roles[888888] /permission/** = authc, roles[888888] /** = anon </value> </property> However, when I use the annotations in java code, it doesn't work. Do I missed anything? Any advice? Thanks, Jared, (韦煜) Software developer Interested in open source software, big data, Linux
