{"action":"closed","issue":{"url":"https://api.github.com/repos/spring-projects/spring-social/issues/165","labels_url":"https://api.github.com/repos/spring-projects/spring-social/issues/165/labels{/name}","comments_url":"https://api.github.com/repos/spring-projects/spring-social/issues/165/comments","events_url":"https://api.github.com/repos/spring-projects/spring-social/issues/165/events","html_url":"https://github.com/spring-projects/spring-social/issues/165","id":81311458,"number":165,"title":"shouldn't ConnectionFactoryLocator be auto-configured in spring boot application?","user":{"login":"Zane-XY","id":2939476,"avatar_url":"https://avatars.githubusercontent.com/u/2939476?v=3","gravatar_id":"","url":"https://api.github.com/users/Zane-XY","html_url":"https://github.com/Zane-XY","followers_url":"https://api.github.com/users/Zane-XY/followers","following_url":"https://api.github.com/users/Zane-XY/following{/other_user}","gists_url":"https://api.github.com/users/Zane-XY/gists{/gist_id}","starred_url":"https://api.github.com/users/Zane-XY/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zane-XY/subscriptions","organizations_url":"https://api.github.com/users/Zane-XY/orgs","repos_url":"https://api.github.com/users/Zane-XY/repos","events_url":"https://api.github.com/users/Zane-XY/events{/privacy}","received_events_url":"https://api.github.com/users/Zane-XY/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-27T06:53:30Z","updated_at":"2015-05-27T07:12:28Z","closed_at":"2015-05-27T07:12:28Z","body":"in the current `spring-social-showcase-boot`, I didn't see `ConnectionFactoryLocator` is configured anywhere, but in the latest code, the `ProviderSignInUtils` constructor has changed to\r\n\r\n```java\r\npublic ProviderSignInUtils( ConnectionFactoryLocator connectionFactoryLocator,UsersConnectionRepository connectionRepository) {\r\n...\r\n}\r\n```\r\nwhich means I need a `ConnectionFactoryLocator` and `UsersConnectionRepository` bean to create `ProviderSignInUtils`.\r\n\r\nThe recommended way of configure `ConnectionFactoryLocator` shown from the [current reference](http://docs.spring.io/autorepo/docs/spring-social/current/reference/htmlsingle/#providersignincontroller-s-dependencies):\r\n\r\n```java\r\n@Bean\r\n@Scope(value=\"singleton\", proxyMode=ScopedProxyMode.INTERFACES)\r\npublic ConnectionFactoryLocator connectionFactoryLocator() {\r\n    ConnectionFactoryRegistry registry = new ConnectionFactoryRegistry();\r\n\r\n    registry.addConnectionFactory(new FacebookConnectionFactory(\r\n        environment.getProperty(\"facebook.clientId\"),\r\n        environment.getProperty(\"facebook.clientSecret\")));\r\n\r\n    registry.addConnectionFactory(new TwitterConnectionFactory(\r\n        environment.getProperty(\"twitter.consumerKey\"),\r\n        environment.getProperty(\"twitter.consumerSecret\")));\r\n\r\n    return registry;\r\n}\r\n\r\n```\r\n\r\n duplicates the codes with spring-boot's autoconfigure class, like `TwitterAutoConfiguration` `FacebookAutoConfiguration` in the reading properties part, should a `ConnectionFactoryLocator` be configured when it detects the spring-social configuration in the application.properties?\r\n\r\nIt should also be useful to expose the $provider$ConnectionFactory bean created in the `SocialAutoConfigurerAdapter` subclasses: \r\n\r\n```java\r\n@Override\r\nprotected ConnectionFactory<?> createConnectionFactory() {\r\n\t\t\treturn new TwitterConnectionFactory(this.properties.getAppId(),\r\n\t\t\t\t\tthis.properties.getAppSecret());\r\n}\r\n```\r\nthen we can create `ConnectionFactoryRegistry` by just wiring existing factories."}}