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();
}
}
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