WIP: Spring-Upgrade auf 2.2.0
authorKai Moritz <kai@juplo.de>
Tue, 29 Oct 2019 11:12:19 +0000 (12:12 +0100)
committerKai Moritz <kai@juplo.de>
Tue, 29 Oct 2019 16:39:14 +0000 (17:39 +0100)
src/main/java/de/juplo/facebook/errors/FacebookErrorsOAuth2AutoConfiguration.java

index 082b0d6..82b5b15 100644 (file)
@@ -6,13 +6,10 @@ import org.slf4j.LoggerFactory;
 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.security.oauth2.client.servlet.OAuth2ClientAutoConfiguration;
+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;
 
 
 /**
@@ -21,10 +18,9 @@ import org.springframework.security.oauth2.client.http.OAuth2ErrorHandler;
  * @author Kai Moritz
  */
 @Configuration
-@ConditionalOnClass(value = OAuth2RestTemplate.class)
 @AutoConfigureAfter({
   WebMvcAutoConfiguration.class,
-  OAuth2AutoConfiguration.class
+  OAuth2ClientAutoConfiguration.class
   })
 public class FacebookErrorsOAuth2AutoConfiguration
 {