查了资料后知道原来
<async-supported>true</async-supported>
只支持spring3.0以及之后的版本,网上查资料得如下解决方案
把web.xml标题头
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">
替换为
<web-app version="3.0"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" >
然后再使用
<async-supported>true</async-supported>
就不会报错了。
这里着重说明一点,该标签一定要紧跟所配置的那个filter要不然还是会报错的。
正确的方式
错误的方式