You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@shiro.apache.org by "phdbutbachelor (via GitHub)" <gi...@apache.org> on 2025/02/07 02:16:11 UTC
Re: [I] [Question] SseEmitter.complete() throws Error:No SecurityManager accessible to the calling code, either bound to the org.apache.shiro.util.ThreadContext or as a vm static singleton. This is an invalid application configuration. [shiro]
phdbutbachelor commented on issue #1950:
URL: https://github.com/apache/shiro/issues/1950#issuecomment-2641766380
Register a FilterRegistrationBean which target your ShiroFilterFactoryBean can work correctly in async environment:
```
@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 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: issues-unsubscribe@shiro.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@shiro.apache.org
For additional commands, e-mail: issues-help@shiro.apache.org