springMvc的controller模块写单元测试时候报错
java.lang.NoClassDefFoundError: javax/servlet/SessionCookieConfig
解决方法:pom.xml中添加servlet 3.0.1 的依赖,对应的maven依赖为:
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
<scope>test</scope>
</dependency>