This is mostly pseudo code, but something like:
ApplicationContext appContext = SpringUtil.getApplicationContext();
AbstractShiroFilter filter = appContext.getBean(AbstractShiroFilter.class); //
or possibly appContext.getBean(ShiroFilterFactoryBean.class).getObject()
PathMatchingFilterChainResolver resolver = (PathMatchingFilterChainResolver)
resolver.getFilterChainManager().addFilter(<your logic here>)
I mentioned subclassing mostly to get around dealing with the above object
graph, and casting, but something like the above should work.
On Tue, Oct 11, 2016 at 11:55 AM, Hitesh <umaletiya.hit...@gmail.com> wrote:
> First of all, I am using the ShiroFilterFactoryBean only. Here is the xml
> configuration of that -
> /<bean id="shiroFilter"
> <property name="securityManager" ref="securityManager" />
> <property name="loginUrl" value="/home/login.zul" />
> <property name="successUrl" value="/home/index.zul" />
> <property name="unauthorizedUrl" value="/home/unauthorized.zul" />
> <property name="filterChainDefinitions"
> Now, when I save URL = Role Mapping from UI, I get reference of this bean
> from application context and then invoke setFilterChainDefinition() method
> on it. The exact lines are -
> *ApplicationContext appContext = SpringUtil.getApplicationContext();
> Later, as per your suggestion, I extended the ShiroFilterFactoryBean and
> created my own user defined ShiroFilterBean which I attached in one of the
> earlier reply. I actually want to know what exactly I am supposed to do in
> the subclass. You have the file. You can suggest.
> View this message in context: http://shiro-developer.582600.
> Sent from the Shiro Developer mailing list archive at Nabble.com.