{"action":"created","comment":{"url":"https://api.github.com/repos/spring-projects/spring-session/pulls/comments/74052648","id":74052648,"diff_hunk":"@@ -0,0 +1,81 @@\n+/*\n+ * Copyright 2014-2016 the original author or authors.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *      http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+package org.springframework.session.data.cassandra.config.annotation.web.http;\n+\n+import com.datastax.driver.core.Cluster;\n+import com.datastax.driver.core.Session;\n+\n+import org.springframework.context.annotation.Bean;\n+import org.springframework.context.annotation.Configuration;\n+import org.springframework.context.annotation.ImportAware;\n+import org.springframework.core.convert.support.GenericConversionService;\n+import org.springframework.core.serializer.support.DeserializingConverter;\n+import org.springframework.core.serializer.support.SerializingConverter;\n+import org.springframework.core.type.AnnotationMetadata;\n+import org.springframework.data.cassandra.core.CassandraTemplate;\n+import org.springframework.session.SessionRepository;\n+import org.springframework.session.config.annotation.web.http.SpringHttpSessionConfiguration;\n+import org.springframework.session.data.cassandra.CassandraSessionRepository;\n+import org.springframework.session.data.gemfire.config.annotation.web.http.EnableGemFireHttpSession;\n+\n+/**\n+ * The CassandraHttpSessionConfiguration class is a Spring @Configuration class used to\n+ * configure and initialize Cassandra as a\n+ * HttpSession provider implementation in Spring Session.\n+ *\n+ * @author John Blum\n+ * @since 1.1.0\n+ * @see EnableGemFireHttpSession\n+ */\n+@Configuration\n+public class CassandraHttpSessionConfiguration extends SpringHttpSessionConfiguration implements ImportAware {\n+\n+\n+\tprivate static GenericConversionService createDefaultConversionService() {\n+\t\tGenericConversionService converter = new GenericConversionService();\n+\t\tconverter.addConverter(Object.class, byte[].class,\n+\t\t\t\tnew SerializingConverter());\n+\t\tconverter.addConverter(byte[].class, Object.class,\n+\t\t\t\tnew DeserializingConverter());\n+\t\treturn converter;\n+\t}\n+\n+\t@Bean\n+\tCluster cluster() {\n+\t\treturn Cluster.builder()\n+\t\t\t\t.addContactPoint(\"localhost\").build();\n+\t}\n+\n+\t@Bean\n+\tSession session(Cluster cluster) {\n+\t\treturn cluster.connect(\"spring_session\");","path":"spring-session/src/main/java/org/springframework/session/data/cassandra/config/annotation/web/http/CassandraHttpSessionConfiguration.java","position":65,"original_position":65,"commit_id":"f45a1c1dbe37006db3eb3a8e4d53cc3aafd90a5c","original_commit_id":"f45a1c1dbe37006db3eb3a8e4d53cc3aafd90a5c","user":{"login":"mp911de","id":1035015,"avatar_url":"https://avatars.githubusercontent.com/u/1035015?v=3","gravatar_id":"","url":"https://api.github.com/users/mp911de","html_url":"https://github.com/mp911de","followers_url":"https://api.github.com/users/mp911de/followers","following_url":"https://api.github.com/users/mp911de/following{/other_user}","gists_url":"https://api.github.com/users/mp911de/gists{/gist_id}","starred_url":"https://api.github.com/users/mp911de/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mp911de/subscriptions","organizations_url":"https://api.github.com/users/mp911de/orgs","repos_url":"https://api.github.com/users/mp911de/repos","events_url":"https://api.github.com/users/mp911de/events{/privacy}","received_events_url":"https://api.github.com/users/mp911de/received_events","type":"User","site_admin":false},"body":"You might want to keep the keyspace name configurable and add a qualifier. Otherwise, this `Session` instance might be used by other components (Spring Data, Zipkin, ...)","created_at":"2016-08-09T13:01:20Z","updated_at":"2016-08-09T13:01:20Z","html_url":"https://github.com/spring-projects/spring-session/pull/589#discussion_r74052648","pull_request_url":"https://api.github.com/repos/spring-projects/spring-session/pulls/589","_links":{"self":{"href":"https://api.github.com/repos/spring-projects/spring-session/pulls/comments/74052648"},"html":{"href":"https://github.com/spring-projects/spring-session/pull/589#discussion_r74052648"},"pull_request":{"href":"https://api.github.com/repos/spring-projects/spring-session/pulls/589"}}},"pull_request":{"url":"https://api.github.com/repos/spring-projects/spring-session/pulls/589","id":80376208,"html_url":"https://github.com/spring-projects/spring-session/pull/589","diff_url":"https://github.com/spring-projects/spring-session/pull/589.diff","patch_url":"https://github.com/spring-projects/spring-session/pull/589.patch","issue_url":"https://api.github.com/repos/spring-projects/spring-session/issues/589","number":589,"state":"open","locked":false,"title":"Initial support for cassandra backend","user":{"login":"Fitzoh","id":131809,"avatar_url":"https://avatars.githubusercontent.com/u/131809?v=3","gravatar_id":"","url":"https://api.github.com/users/Fitzoh","html_url":"https://github.com/Fitzoh","followers_url":"https://api.github.com/users/Fitzoh/followers","following_url":"https://api.github.com/users/Fitzoh/following{/other_user}","gists_url":"https://api.github.com/users/Fitzoh/gists{/gist_id}","starred_url":"https://api.github.com/users/Fitzoh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fitzoh/subscriptions","organizations_url":"https://api.github.com/users/Fitzoh/orgs","repos_url":"https://api.github.com/users/Fitzoh/repos","events_url":"https://api.github.com/users/Fitzoh/events{/privacy}","received_events_url":"https://api.github.com/users/Fitzoh/received_events","type":"User","site_admin":false},"body":"<!--\r\nThanks for contributing to Spring Session. Please provide a brief description of your pull-request and reference any related issue numbers (prefix references with #).\r\n-->\r\nProvides a Cassandra Spring Session backend per #588, with dependencies provided via [Spring Data Cassandra](http://projects.spring.io/spring-data-cassandra/).\r\n","created_at":"2016-08-07T19:56:43Z","updated_at":"2016-08-09T13:01:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5902a82121bb37845005aa498f102ca250b4f81f","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/spring-projects/spring-session/pulls/589/commits","review_comments_url":"https://api.github.com/repos/spring-projects/spring-session/pulls/589/comments","review_comment_url":"https://api.github.com/repos/spring-projects/spring-session/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spring-projects/spring-session/issues/589/comments","statuses_url":"https://api.github.com/repos/spring-projects/spring-session/statuses/f45a1c1dbe37006db3eb3a8e4d53cc3aafd90a5c","head":{"label":"Fitzoh:master","ref":"master","sha":"f45a1c1dbe37006db3eb3a8e4d53cc3aafd90a5c","user":{"login":"Fitzoh","id":131809,"avatar_url":"https://avatars.githubusercontent.com/u/131809?v=3","gravatar_id":"","url":"https://api.github.com/users/Fitzoh","html_url":"https://github.com/Fitzoh","followers_url":"https://api.github.com/users/Fitzoh/followers","following_url":"https://api.github.com/users/Fitzoh/following{/other_user}","gists_url":"https://api.github.com/users/Fitzoh/gists{/gist_id}","starred_url":"https://api.github.com/users/Fitzoh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fitzoh/subscriptions","organizations_url":"https://api.github.com/users/Fitzoh/orgs","repos_url":"https://api.github.com/users/Fitzoh/repos","events_url":"https://api.github.com/users/Fitzoh/events{/privacy}","received_events_url":"https://api.github.com/users/Fitzoh/received_events","type":"User","site_admin":false},"repo":{"id":65100412,"name":"spring-session","full_name":"Fitzoh/spring-session","owner":{"login":"Fitzoh","id":131809,"avatar_url":"https://avatars.githubusercontent.com/u/131809?v=3","gravatar_id":"","url":"https://api.github.com/users/Fitzoh","html_url":"https://github.com/Fitzoh","followers_url":"https://api.github.com/users/Fitzoh/followers","following_url":"https://api.github.com/users/Fitzoh/following{/other_user}","gists_url":"https://api.github.com/users/Fitzoh/gists{/gist_id}","starred_url":"https://api.github.com/users/Fitzoh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fitzoh/subscriptions","organizations_url":"https://api.github.com/users/Fitzoh/orgs","repos_url":"https://api.github.com/users/Fitzoh/repos","events_url":"https://api.github.com/users/Fitzoh/events{/privacy}","received_events_url":"https://api.github.com/users/Fitzoh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Fitzoh/spring-session","description":"Spring Session","fork":true,"url":"https://api.github.com/repos/Fitzoh/spring-session","forks_url":"https://api.github.com/repos/Fitzoh/spring-session/forks","keys_url":"https://api.github.com/repos/Fitzoh/spring-session/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Fitzoh/spring-session/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Fitzoh/spring-session/teams","hooks_url":"https://api.github.com/repos/Fitzoh/spring-session/hooks","issue_events_url":"https://api.github.com/repos/Fitzoh/spring-session/issues/events{/number}","events_url":"https://api.github.com/repos/Fitzoh/spring-session/events","assignees_url":"https://api.github.com/repos/Fitzoh/spring-session/assignees{/user}","branches_url":"https://api.github.com/repos/Fitzoh/spring-session/branches{/branch}","tags_url":"https://api.github.com/repos/Fitzoh/spring-session/tags","blobs_url":"https://api.github.com/repos/Fitzoh/spring-session/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Fitzoh/spring-session/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Fitzoh/spring-session/git/refs{/sha}","trees_url":"https://api.github.com/repos/Fitzoh/spring-session/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Fitzoh/spring-session/statuses/{sha}","languages_url":"https://api.github.com/repos/Fitzoh/spring-session/languages","stargazers_url":"https://api.github.com/repos/Fitzoh/spring-session/stargazers","contributors_url":"https://api.github.com/repos/Fitzoh/spring-session/contributors","subscribers_url":"https://api.github.com/repos/Fitzoh/spring-session/subscribers","subscription_url":"https://api.github.com/repos/Fitzoh/spring-session/subscription","commits_url":"https://api.github.com/repos/Fitzoh/spring-session/commits{/sha}","git_commits_url":"https://api.github.com/repos/Fitzoh/spring-session/git/commits{/sha}","comments_url":"https://api.github.com/repos/Fitzoh/spring-session/comments{/number}","issue_comment_url":"https://api.github.com/repos/Fitzoh/spring-session/issues/comments{/number}","contents_url":"https://api.github.com/repos/Fitzoh/spring-session/contents/{+path}","compare_url":"https://api.github.com/repos/Fitzoh/spring-session/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Fitzoh/spring-session/merges","archive_url":"https://api.github.com/repos/Fitzoh/spring-session/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Fitzoh/spring-session/downloads","issues_url":"https://api.github.com/repos/Fitzoh/spring-session/issues{/number}","pulls_url":"https://api.github.com/repos/Fitzoh/spring-session/pulls{/number}","milestones_url":"https://api.github.com/repos/Fitzoh/spring-session/milestones{/number}","notifications_url":"https://api.github.com/repos/Fitzoh/spring-session/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Fitzoh/spring-session/labels{/name}","releases_url":"https://api.github.com/repos/Fitzoh/spring-session/releases{/id}","deployments_url":"https://api.github.com/repos/Fitzoh/spring-session/deployments","created_at":"2016-08-06T20:17:45Z","updated_at":"2016-08-06T20:17:47Z","pushed_at":"2016-08-09T11:47:38Z","git_url":"git://github.com/Fitzoh/spring-session.git","ssh_url":"git@github.com:Fitzoh/spring-session.git","clone_url":"https://github.com/Fitzoh/spring-session.git","svn_url":"https://github.com/Fitzoh/spring-session","homepage":"https://spring.io/spring-session","size":18096,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"spring-projects:master","ref":"master","sha":"9f36fd69ee64a27f224239a53bb9e3c12f062d4f","user":{"login":"spring-projects","id":317776,"avatar_url":"https://avatars.githubusercontent.com/u/317776?v=3","gravatar_id":"","url":"https://api.github.com/users/spring-projects","html_url":"https://github.com/spring-projects","followers_url":"https://api.github.com/users/spring-projects/followers","following_url":"https://api.github.com/users/spring-projects/following{/other_user}","gists_url":"https://api.github.com/users/spring-projects/gists{/gist_id}","starred_url":"https://api.github.com/users/spring-projects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spring-projects/subscriptions","organizations_url":"https://api.github.com/users/spring-projects/orgs","repos_url":"https://api.github.com/users/spring-projects/repos","events_url":"https://api.github.com/users/spring-projects/events{/privacy}","received_events_url":"https://api.github.com/users/spring-projects/received_events","type":"Organization","site_admin":false},"repo":{"id":21052744,"name":"spring-session","full_name":"spring-projects/spring-session","owner":{"login":"spring-projects","id":317776,"avatar_url":"https://avatars.githubusercontent.com/u/317776?v=3","gravatar_id":"","url":"https://api.github.com/users/spring-projects","html_url":"https://github.com/spring-projects","followers_url":"https://api.github.com/users/spring-projects/followers","following_url":"https://api.github.com/users/spring-projects/following{/other_user}","gists_url":"https://api.github.com/users/spring-projects/gists{/gist_id}","starred_url":"https://api.github.com/users/spring-projects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spring-projects/subscriptions","organizations_url":"https://api.github.com/users/spring-projects/orgs","repos_url":"https://api.github.com/users/spring-projects/repos","events_url":"https://api.github.com/users/spring-projects/events{/privacy}","received_events_url":"https://api.github.com/users/spring-projects/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spring-projects/spring-session","description":"Spring Session","fork":false,"url":"https://api.github.com/repos/spring-projects/spring-session","forks_url":"https://api.github.com/repos/spring-projects/spring-session/forks","keys_url":"https://api.github.com/repos/spring-projects/spring-session/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spring-projects/spring-session/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spring-projects/spring-session/teams","hooks_url":"https://api.github.com/repos/spring-projects/spring-session/hooks","issue_events_url":"https://api.github.com/repos/spring-projects/spring-session/issues/events{/number}","events_url":"https://api.github.com/repos/spring-projects/spring-session/events","assignees_url":"https://api.github.com/repos/spring-projects/spring-session/assignees{/user}","branches_url":"https://api.github.com/repos/spring-projects/spring-session/branches{/branch}","tags_url":"https://api.github.com/repos/spring-projects/spring-session/tags","blobs_url":"https://api.github.com/repos/spring-projects/spring-session/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spring-projects/spring-session/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spring-projects/spring-session/git/refs{/sha}","trees_url":"https://api.github.com/repos/spring-projects/spring-session/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spring-projects/spring-session/statuses/{sha}","languages_url":"https://api.github.com/repos/spring-projects/spring-session/languages","stargazers_url":"https://api.github.com/repos/spring-projects/spring-session/stargazers","contributors_url":"https://api.github.com/repos/spring-projects/spring-session/contributors","subscribers_url":"https://api.github.com/repos/spring-projects/spring-session/subscribers","subscription_url":"https://api.github.com/repos/spring-projects/spring-session/subscription","commits_url":"https://api.github.com/repos/spring-projects/spring-session/commits{/sha}","git_commits_url":"https://api.github.com/repos/spring-projects/spring-session/git/commits{/sha}","comments_url":"https://api.github.com/repos/spring-projects/spring-session/comments{/number}","issue_comment_url":"https://api.github.com/repos/spring-projects/spring-session/issues/comments{/number}","contents_url":"https://api.github.com/repos/spring-projects/spring-session/contents/{+path}","compare_url":"https://api.github.com/repos/spring-projects/spring-session/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spring-projects/spring-session/merges","archive_url":"https://api.github.com/repos/spring-projects/spring-session/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spring-projects/spring-session/downloads","issues_url":"https://api.github.com/repos/spring-projects/spring-session/issues{/number}","pulls_url":"https://api.github.com/repos/spring-projects/spring-session/pulls{/number}","milestones_url":"https://api.github.com/repos/spring-projects/spring-session/milestones{/number}","notifications_url":"https://api.github.com/repos/spring-projects/spring-session/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spring-projects/spring-session/labels{/name}","releases_url":"https://api.github.com/repos/spring-projects/spring-session/releases{/id}","deployments_url":"https://api.github.com/repos/spring-projects/spring-session/deployments","created_at":"2014-06-20T21:16:58Z","updated_at":"2016-08-09T12:10:31Z","pushed_at":"2016-08-09T11:47:38Z","git_url":"git://github.com/spring-projects/spring-session.git","ssh_url":"git@github.com:spring-projects/spring-session.git","clone_url":"https://github.com/spring-projects/spring-session.git","svn_url":"https://github.com/spring-projects/spring-session","homepage":"https://spring.io/spring-session","size":18714,"stargazers_count":642,"watchers_count":642,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":366,"mirror_url":null,"open_issues_count":148,"forks":366,"open_issues":148,"watchers":642,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spring-projects/spring-session/pulls/589"},"html":{"href":"https://github.com/spring-projects/spring-session/pull/589"},"issue":{"href":"https://api.github.com/repos/spring-projects/spring-session/issues/589"},"comments":{"href":"https://api.github.com/repos/spring-projects/spring-session/issues/589/comments"},"review_comments":{"href":"https://api.github.com/repos/spring-projects/spring-session/pulls/589/comments"},"review_comment":{"href":"https://api.github.com/repos/spring-projects/spring-session/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spring-projects/spring-session/pulls/589/commits"},"statuses":{"href":"https://api.github.com/repos/spring-projects/spring-session/statuses/f45a1c1dbe37006db3eb3a8e4d53cc3aafd90a5c"}}}}
{"actor":{"display_login":"mp911de"}}