我之前使用的是java jdk 17,我用jdk 17构建了我所有的springboots maven项目,但现在我已经在我的笔记本电脑上安装了java jdk 23,然后我尝试运行我的springboot maven项目,它告诉我错误
所以,我尝试将版本从 17 更改为 23,并在 intellij 的项目结构中更改它,但仍然遇到相同的错误
Failed to read candidate component class: file [C:\SpringBoot Projects\springboot-jwt-token-auth\springboot-jwt-token-auth\target\classes\com\abdul\springbootjwttokenauth\config\JwtAuthenticationFilter.class]
和
Unsupported class file major version 67
Update Java Version in Maven Configuration:
<properties>
<java.version>23</java.version>
</properties>
Invalidate Caches and Restart IntelliJ: In IntelliJ, go to File > Invalidate Caches / Restart.
Delete Target Directory:
mvn clean install
Check for Compatibility with JDK 23: You may need to update Spring Boot or specific dependencies to ensure compatibility with JDK 23.
Verify JDK in IntelliJ: Go to File > Project Structure > Project and make sure the Project SDK is set to JDK 23. Also, check Modules > Sources to confirm the Language level is compatible with your JDK 23
https://admirable-smakager-729141.netlify.app/post/2