首页 > 其他分享 >spring-security-oauth2-client与jdk版本不符合报错

spring-security-oauth2-client与jdk版本不符合报错

时间:2023-02-09 14:34:18浏览次数:49  
标签:oauth2 jdk spring client 报错 版本 security

报错描述:

java.lang.UnsupportedClassVersionError: org/springframework/security/oauth2/client/registration/ClientRegistrationRepository has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0

报错原因:版本设置为自动获取最新版本(<version>RELEASE</version>),最新版本6.0.1需要jdk版本17,具体版本对应可百度.

<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-oauth2-client</artifactId>
<version>RELEASE</version>
<scope>compile</scope>
</dependency>

报错解决:将spring-security-oauth2-client的版本调整为具体的支持jdk1.8的低版本。

<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-oauth2-client</artifactId>
<version>5.0.7.RELEASE</version>
<scope>compile</scope>
</dependency>
 

标签:oauth2,jdk,spring,client,报错,版本,security
From: https://www.cnblogs.com/niqiaoyoufeng/p/17105151.html

相关文章