測試(用test時) 項目遇到的問題
Error creating bean with name 'mvcContentNegotiationManager'
在網上大致的查了一下看到了兩種解決辦法
- 在test時注解掉 mvc的接口驅動 <mvc:annotation-driven />
- 在pom文件中加 tomcat servlet-api的包
<dependency>
<groupId>tomcat</groupId>
<artifactId>servlet-api</artifactId>
<version>5.5.23</version>
</dependency>
我解決了這個問題但是並不知道是什么原理
如果幸運的話有大神看到了帖子還希望不吝賜教