开发者社区 问答 正文

SpringMVC报错,看不懂,求解?报错

严重: Servlet.service() for servlet [SpringMVC] in context with path [/shop] threw exception [Handler processing failed; nested exception is java.lang.NoClassDefFoundError: org/springframework/core/annotation/SynthesizingMethodParameter] with root cause
java.lang.ClassNotFoundException: org.springframework.core.annotation.SynthesizingMethodParameter

展开
收起
爱吃鱼的程序员 2020-06-09 13:25:54 751 分享 版权
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    spring的jar包有没有放置正确,是否完整、版本是否正确,你的配置是否正确。

    因为“org.springframework.core.annotation.SynthesizingMethodParameter“这个类是要在spring4.2开始才有的

    嗯,我换了高版本的包,然后好了我觉得是不是你tomcat下面部署了多个项目,然后项目的包名是一样的不是的没有类?jar包不完整?错误信息太少了,不能定位我给出了全部错误信息,帮我看看

    引用来自“阿信sxq”的评论

    没有类?jar包不完整?错误信息太少了,不能定位你现在又贴出来的不是说类没找到么检查一下应该少jar包还有可能是一些jar包与spring版本不兼容,比如有的jar包依赖spring的 SynthesizingMethodParameter,而你用的spring版本没这个类。我查了下这个类好像是源自spring4.2的。 嗯,jar包版本和Spring版本要尽量靠近 这是缺少jar包的报错,查看这里:http://www.whatjar.net/s.do?keyword=org%2Fspringframework%2Fcore%2Fannotation%2FSynthesizingMethodParameter谢谢,已解决,有那个包,只是版本太低了
    2020-06-09 13:26:11
    赞同 展开评论
问答地址: