Korrigieren Sie den Klassenpfad Ihrer Anwendung, damit sie eine einzige, kompatible Version von oAuth2.client.registratiJava

Java-Forum
Anonymous
 Korrigieren Sie den Klassenpfad Ihrer Anwendung, damit sie eine einzige, kompatible Version von oAuth2.client.registrati

Post by Anonymous »

ein Ich habe MVN Clean Installation gemacht und versucht, erneut zu abzusetzen.

Code: Select all

An attempt was made to call a method that does not exist.  The attempt was made from the following location:

org.springframework.boot.autoconfigure.security.oauth2.client.OAuth2ClientPropertiesRegistrationAdapter.getBuilderFromIssuerIfPossible(OAuth2ClientPropertiesRegistrationAdapter.java:83)

The following method did not exist:

org.springframework.security.oauth2.client.registration.ClientRegistrations.fromIssuerLocation(Ljava/lang/String;)Lorg/springframework/security/oauth2/client/registration/ClientRegistration$Builder;

Action:

Correct the classpath of your application so that it contains a single, compatible version of org.springframework.security.oauth2.client.registration.ClientRegistrations
< /code>
Hier ist mein Code: < /p>
@Configuration
public class SecurityConfig extends WebSecurityConfigurerAdapter
{
@Override
protected void configure(HttpSecurity http) throws Exception {
http.authorizeRequests()
.anyRequest().authenticated()
.and()
.oauth2Login();
}
}
Aktualisierte POM -Datei:

Code: Select all

    
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0

com.baeldung.keycloak
E-Services-Portal
war


org.springframework.boot
spring-boot-starter-parent
2.2.2.RELEASE
  



1.8




org.keycloak.bom
keycloak-adapter-bom
3.3.0.Final
pom
provided






org.springframework.boot
spring-boot-starter-security


org.springframework.boot
spring-boot-starter-web


org.springframework.boot
spring-boot-starter-tomcat
provided


org.springframework.security
spring-security-oauth2-client



org.springframework.boot
spring-boot-starter-test
test


org.junit.vintage
junit-vintage-engine





org.apache.tomcat.embed
tomcat-embed-jasper
provided


javax.servlet
jstl
provided


org.glassfish.web
el-impl
2.2


org.axonframework
axon-spring-boot-starter
3.4





central
Maven Plugin Repository
https://repo.maven.apache.org/maven2
default

false


never








org.apache.maven.plugins
maven-war-plugin
3.2.3

/sample/servlet/container/deploy/directory






Hinweis: Ich verwende Spring 2.2.2

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post