异常处理:org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate compon

异常信息如下:

org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [D:\DateFile\eclipse_workspace2\springmvc\target\classes\cn\springmvc\service\impl\UserServiceImpl.class]; nested exception is org.springframework.core.NestedIOException: ASM ClassReader failed to parse class file - probably due to a new Java class file version that isn't supported yet: file [D:\DateFile\eclipse_workspace2\springmvc\target\classes\cn\springmvc\service\impl\UserServiceImpl.class]; nested exception is java.lang.IllegalArgumentException

    at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:290)

问题原因:spring3.2是不能与jdk1.8兼容的.

解决办法:换jdk改成1.7,改project facets 里面java的版本。

另:spring3.X是不支持@RestController注解的,spring4.X才支持。

但是spring3.X 据说也可以写支持restful风格的controller。具体还没有实验,待以后有时间会将学习结果更新。


注:本文作为学习记录之用,如有任何违反规则,请联系我,我会及时删除。


  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值