Quantcast
Channel: IT社区推荐资讯 - ITIndex.net
Viewing all articles
Browse latest Browse all 11804

spring mvc使用Servlet3异步要注意的几个问题

$
0
0
1、注意添加
<async-supported>true</async-supported>
在web.xml中对DispatcherServlet添加<async-supported>true</async-supported>

2、如果集成了shiro一定要注意在mapping中增加dispatcher项,否则会抛出org.apache.shiro.UnavailableSecurityManagerException异常

<filter-mapping><filter-name>shiroFilter</filter-name><url-pattern>/*</url-pattern><dispatcher>REQUEST</dispatcher><dispatcher>ASYNC</dispatcher></filter-mapping>


3、如果项目用到了ehcache gzip filter,在异步请求返回时会抛出java.io.IOException: write beyond end of stream异常,解决方案是将gzip filer 换成com.googlecode.webutilities的compressionFilter

已有 0人发表留言,猛击->> 这里<<-参与讨论


ITeye推荐




Viewing all articles
Browse latest Browse all 11804

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>