passerbyYSQ commented on issue #1950:
URL: https://github.com/apache/shiro/issues/1950#issuecomment-2644533966
> Register a FilterRegistrationBean which target your ShiroFilterFactoryBean
can work correctly in async
environment:注册一个针对您的ShirofilterFactoryBean的FilterRegistrationBean可以在异步环境中正确工作:
>
> ```
> @Bean
> public FilterRegistrationBean<DelegatingFilterProxy>
filterRegistrationBean() {
> DelegatingFilterProxy _proxy = new DelegatingFilterProxy();
> _proxy.setTargetBeanName("shiroFilterFactoryBean");
> _proxy.setTargetFilterLifecycle(true);
>
> FilterRegistrationBean<DelegatingFilterProxy> _registration = new
FilterRegistrationBean<>();
> _registration.setFilter(_proxy);
> _registration.setAsyncSupported(true);
> _registration.setDispatcherTypes(ASYNC);
> return _registration;
> }
> ```
This is feasible. Could you explain why this works? Will it have any other
impacts?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]