From f17e9f2619485ca021b8751eba55c5e2040cd1ff Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Tue, 29 Oct 2019 09:03:46 +0100 Subject: [PATCH] WIP: Spring-Upgrade auf 2.2.0 --- pom.xml | 19 +++++++------------ ...FacebookErrorsOAuth2AutoConfiguration.java | 5 +---- ...okErrorsSpringSocialAutoConfiguration.java | 5 +---- .../errors/OAuth2GraphApiErrorHandler.java | 8 ++++---- 4 files changed, 13 insertions(+), 24 deletions(-) diff --git a/pom.xml b/pom.xml index e9ad2bd..c5088ff 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.boot spring-boot-starter-parent - 1.3.7.RELEASE + 2.2.0.RELEASE @@ -18,10 +18,6 @@ http://juplo.de/facebook-errors - - 2.0.6 - - @@ -69,18 +65,17 @@ - org.springframework.boot - spring-boot-autoconfigure - true + org.springframework + spring-webmvc - org.springframework.social - spring-social-facebook + org.springframework.boot + spring-boot-autoconfigure true - org.springframework.security.oauth - spring-security-oauth2 + org.springframework.security + spring-security-oauth2-client true diff --git a/src/main/java/de/juplo/facebook/errors/FacebookErrorsOAuth2AutoConfiguration.java b/src/main/java/de/juplo/facebook/errors/FacebookErrorsOAuth2AutoConfiguration.java index 082b0d6..c1647fc 100644 --- a/src/main/java/de/juplo/facebook/errors/FacebookErrorsOAuth2AutoConfiguration.java +++ b/src/main/java/de/juplo/facebook/errors/FacebookErrorsOAuth2AutoConfiguration.java @@ -7,12 +7,9 @@ import org.springframework.beans.BeansException; import org.springframework.beans.factory.config.BeanPostProcessor; import org.springframework.boot.autoconfigure.AutoConfigureAfter; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; -import org.springframework.boot.autoconfigure.security.oauth2.OAuth2AutoConfiguration; -import org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration; +import org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.security.oauth2.client.OAuth2RestTemplate; -import org.springframework.security.oauth2.client.http.OAuth2ErrorHandler; /** diff --git a/src/main/java/de/juplo/facebook/errors/FacebookErrorsSpringSocialAutoConfiguration.java b/src/main/java/de/juplo/facebook/errors/FacebookErrorsSpringSocialAutoConfiguration.java index 49a3101..0e542c1 100644 --- a/src/main/java/de/juplo/facebook/errors/FacebookErrorsSpringSocialAutoConfiguration.java +++ b/src/main/java/de/juplo/facebook/errors/FacebookErrorsSpringSocialAutoConfiguration.java @@ -12,12 +12,9 @@ import org.springframework.beans.factory.support.BeanDefinitionRegistry; import org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor; import org.springframework.boot.autoconfigure.AutoConfigureAfter; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; -import org.springframework.boot.autoconfigure.social.FacebookAutoConfiguration; -import org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration; +import org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.social.facebook.api.Facebook; -import org.springframework.social.facebook.api.impl.FacebookTemplate; import org.springframework.web.client.ResponseErrorHandler; import org.springframework.web.client.RestTemplate; diff --git a/src/main/java/de/juplo/facebook/errors/OAuth2GraphApiErrorHandler.java b/src/main/java/de/juplo/facebook/errors/OAuth2GraphApiErrorHandler.java index 9158987..e83e47f 100644 --- a/src/main/java/de/juplo/facebook/errors/OAuth2GraphApiErrorHandler.java +++ b/src/main/java/de/juplo/facebook/errors/OAuth2GraphApiErrorHandler.java @@ -6,7 +6,7 @@ import java.util.List; import org.springframework.http.HttpStatus; import org.springframework.http.client.ClientHttpResponse; import org.springframework.http.converter.HttpMessageConverter; -import org.springframework.security.oauth2.client.http.OAuth2ErrorHandler; +import org.springframework.security.oauth2.client.http.OAuth2ErrorResponseErrorHandler; @@ -14,12 +14,12 @@ import org.springframework.security.oauth2.client.http.OAuth2ErrorHandler; * * @author Kai Moritz */ -public class OAuth2GraphApiErrorHandler extends OAuth2ErrorHandler +public class OAuth2GraphApiErrorHandler extends OAuth2ErrorResponseErrorHandler { - private final OAuth2ErrorHandler parent; + private final OAuth2ErrorResponseErrorHandler parent; - public OAuth2GraphApiErrorHandler(OAuth2ErrorHandler handler) + public OAuth2GraphApiErrorHandler(OAuth2ErrorResponseErrorHandler handler) { super(null); parent = handler; -- 2.20.1