栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

BeanDefinitionStoreException: Failed to read candidate component class probably due to a new Java

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

BeanDefinitionStoreException: Failed to read candidate component class probably due to a new Java

在学习Spring框架中的注解时,第一次测试就出现了这个问题,百思不得其解
最后发现是JDK和Spring的版本不匹配,我的Spring框架版本为5.2.6 仅仅支持到JDK15 而我的是JDK16,由此出现了问题

  • Spring framework 5.3.x: JDK 8-17 (expected)
  • Spring framework 5.2.x: JDK 8-15 (expected)
  • Spring framework 5.1.x: JDK 8-12
  • Spring framework 5.0.x: JDK 8-10
  • Spring framework 4.3.x: JDK 6-8

本来准备再下载一个JDK8,突然发现在File-Setting-Build, Execution... - Java Compiler中能够调整Project bytecode version将这里由16修改为15 问题得以解决

错误:org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [D:java学习spring5_demo3outproductionspring5_demo3comspring5serviceUserService.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:java学习spring5_demo3outproductionspring5_demo3comspring5serviceUserService.class]; nested exception is java.lang.IllegalArgumentException: Unsupported class file major version 60

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/294813.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号