报错的原因: spring 4与servlet2.5的兼容性问题,可以使用javax.servlet-api替换如下,scope为test
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
<scope>test</scope>
</dependency>