The type org.springframework.http.converter.HttpMessageConverter cannot be resolved. It is indirectl

《The type org.springframework.http.converter.HttpMessageConverter cannot be resolved. It is indirectly referenced from required .class files解决方案》

最近在研读《spring in action》,在配置springMVC的时候,在package的地方出现了这个错误提示,The type org.springframework.http.converter.HttpMessageConverter cannot be resolved. It is indirectly referenced from required .class files,,详细内容是Multiple markers at this line
- The type org.springframework.web.method.support.HandlerMethodReturnValueHandler cannot be resolved. It is indirectly 
referenced from required .class files
- The type org.springframework.web.method.support.HandlerMethodArgumentResolver cannot be resolved. It is indirectly referenced 
from required .class files
- The type org.springframework.http.converter.HttpMessageConverter cannot be resolved. It is indirectly referenced from 
required .class files

翻译如下

在该行多个标记
- 类型org.springframework.web.method.support.HandlerMethodReturnValueHandler不能得到解决。这是间接地
从所需的.class文件引用
- 类型org.springframework.web.method.support.HandlerMethodArgumentResolver不能得到解决。它是间接引用
从所需的.class文件
- 类型org.springframework.http.converter.HttpMessageConverter不能得到解决。它是间接引用
所需的.class文件

开始我也纠结了一会,但经过我机智的分析,我觉着是jar包缺失问题,但一般的jar包缺失都会直接提示某个类找不到,从而导致编译不通过,但我推测是我引用的jar包依赖与另外一个jar包,所以没用显示的报类not find错误。

解决方案:引入jar包spring-web-4.1.1.RELEASE.jar这个错误就解决掉了。

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值