I've been successfully integrated shiro into my spring application and it has
been running accordingly for the passed 2 yrs. The configuration was in xml
file(defined in application-context.xml) I'm saying this to state that my
configuration using xml file is working accordingly.

Now I'm trying to convert the xml file into java config (defined all beans
in a class.. trying to NOT use xml file anymore), and I'm facing spring
unable to find shiroFilter bean, in which I've defined in my java class.

        @Bean(name="shiroFilter")
        public ShiroFilterFactoryBean shiroFilter(){
                ShiroFilterFactoryBean sffb = new ShiroFilterFactoryBean();
                sffb.setSecurityManager(securityManager());
                sffb.setLoginUrl("/login.jsp");
                sffb.setUnauthorizedUrl("/unauthorized.jsp");
                                
                Map<String, String> chains = new HashMap<String, String>();
                chains.put("/userProfile/**", "anon");
                chains.put("/resources/**", "anon");
                chains.put("/**", "ssl, authc");
                sffb.setFilterChainDefinitionMap(chains);
                return sffb;
        }

Been searching hints over the web but nothing helps to resolve this problem.
Any help would be appreciated.



--
View this message in context: 
http://shiro-user.582556.n2.nabble.com/No-bean-named-shiroFilter-available-when-convert-from-xml-to-JavaConfig-tp7581706.html
Sent from the Shiro User mailing list archive at Nabble.com.

Reply via email to