Spring Social Integration

I need to integrate Spring Social Facebook, Twitter and Google to log in and log in .

I added everything dependencyrelated to Spring social ie spring-social-config, spring-social-core, spring-social-web,spring-social-security, also created bin:

@Bean
    public ConnectionFactoryLocator connectionFactoryLocator() {
        ConnectionFactoryRegistry registry = new ConnectionFactoryRegistry();
        registry.addConnectionFactory(new FacebookConnectionFactory(
            env.getProperty("facebook.clientId"),
            env.getProperty("facebook.clientSecret")));
        return registry;
    }

facebook.clientIdand facebook.clientSecretare in the properties file.

I have been following Spring social facebook documentation , but I don’t understand how to start with this.

Please just let me know how to get started.

+4
source share
1 answer

- . , : http://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html.

Spring, , , /application.properties:

facebook.clientId=clientId
facebook.clientSecret=secret

:

@PropertySource("classpath:/app.properties")
+3

Source: https://habr.com/ru/post/1540352/


All Articles