org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [G:\后端\springboot项目\基础spring boot+vue+uniapp的外卖点餐小程序\项目脚手架\takeaway\springboot\target\classes\com\example\SpringbootApplication.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 [G:\后端\springboot项目\基础spring boot+vue+uniapp的外卖点餐小程序\项目脚手架\takeaway\springboot\target\classes\com\example\SpringbootApplication.class]; nested exception is java.lang.IllegalArgumentException: Unsupported class file major version 65
错误截图:
解决方法:
点击settings->build->compiler->java compiler->per-module bytecode version: 设置target bytecode version 的版本为8 preject bytecode version的版本为8
然后在启动项目测试:
这样就成功啦