Add extra @Conditional to be defensive in Social autoconfig
Older versions of Spring Social will not have the SocialConfigurerAdapter so making social autoconfig conditional on that class makes sense (since it all extends from it). Fixes gh-986
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
package org.springframework.boot.autoconfigure.social;
|
||||
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.bind.RelaxedPropertyResolver;
|
||||
import org.springframework.context.EnvironmentAware;
|
||||
import org.springframework.core.env.Environment;
|
||||
@@ -30,6 +31,7 @@ import org.springframework.social.connect.ConnectionFactory;
|
||||
* @author Craig Walls
|
||||
* @since 1.1.0
|
||||
*/
|
||||
@ConditionalOnClass(SocialConfigurerAdapter.class)
|
||||
abstract class SocialAutoConfigurerAdapter extends SocialConfigurerAdapter implements
|
||||
EnvironmentAware {
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ import org.springframework.web.servlet.view.BeanNameViewResolver;
|
||||
* @since 1.1.0
|
||||
*/
|
||||
@Configuration
|
||||
@ConditionalOnClass({ ConnectController.class })
|
||||
@ConditionalOnClass({ ConnectController.class, SocialConfigurerAdapter.class })
|
||||
@AutoConfigureAfter(WebMvcAutoConfiguration.class)
|
||||
public class SocialWebAutoConfiguration {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user