我是靠谱客的博主 谦让巨人,这篇文章主要介绍idea中导入eclipse的创建的maven项目遇到的深坑,现在分享给大家,希望可以做个参考。

错误信息

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mvcContentNegotiationManager': Failed to introspect bean class [org.springframework.web.accept.ContentNegotiationManagerFactoryBean] for lookup method metadata: could not find class that it depends on; nested exception is java.lang.NoClassDefFoundError: javax/servlet/ServletContext

解决方案:

单元测试在pom文件中加入依赖:

  <dependency>
	  <groupId>javax.servlet</groupId>
	  <artifactId>servlet-api</artifactId>
	  <version>2.5</version>
  </dependency>

	  <dependency>
		  <groupId>tomcat</groupId>
		  <artifactId>servlet-api</artifactId>
		  <version>5.5.23</version>
	  </dependency>

 

 

最后

以上就是谦让巨人最近收集整理的关于idea中导入eclipse的创建的maven项目遇到的深坑的全部内容,更多相关idea中导入eclipse内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(117)

评论列表共有 0 条评论

立即
投稿
返回
顶部