{"action":"created","comment":{"url":"https://api.github.com/repos/vaadin/spring/pulls/comments/209615967","pull_request_review_id":145661637,"id":209615967,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwOTYxNTk2Nw==","diff_hunk":"@@ -0,0 +1,65 @@\n+/*\n+ * Copyright 2000-2018 Vaadin Ltd.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n+ * use this file except in compliance with the License. You may obtain a copy of\n+ * 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, WITHOUT\n+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n+ * License for the specific language governing permissions and limitations under\n+ * the License.\n+ */\n+package com.vaadin.flow.spring;\n+\n+import org.springframework.beans.factory.annotation.Autowired;\n+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;\n+import org.springframework.boot.autoconfigure.web.servlet.DispatcherServletRegistrationBean;\n+import org.springframework.context.annotation.Bean;\n+import org.springframework.context.annotation.Conditional;\n+import org.springframework.context.annotation.Configuration;\n+import org.springframework.web.context.WebApplicationContext;\n+import org.springframework.web.servlet.DispatcherServlet;\n+\n+/**\n+ * Creates a {@link DispatcherServletRegistrationBean} instance for a dispatcher\n+ * servlet in case Vaadin servlet is mapped to the root.\n+ * <p>\n+ * This is a workaround for spring boot 2.0.4 compatibility (see spring#331).\n+ *\n+ * @see #dispatcherServletRegistration()\n+ *\n+ * @author Vaadin Ltd\n+ *\n+ */\n+@Configuration\n+@Conditional(RootMappedCondition.class)\n+@ConditionalOnClass(name = \"org.springframework.boot.autoconfigure.web.servlet.DispatcherServletRegistrationBean\")","path":"vaadin-spring/src/main/java/com/vaadin/flow/spring/DispatcherServletRegistrationBeanConfig.java","position":40,"original_position":40,"commit_id":"b321d4b1aa721fb8b8eda5983b8d6e76292a2fe6","original_commit_id":"b321d4b1aa721fb8b8eda5983b8d6e76292a2fe6","user":{"login":"snicoll","id":490484,"node_id":"MDQ6VXNlcjQ5MDQ4NA==","avatar_url":"https://avatars0.githubusercontent.com/u/490484?v=4","gravatar_id":"","url":"https://api.github.com/users/snicoll","html_url":"https://github.com/snicoll","followers_url":"https://api.github.com/users/snicoll/followers","following_url":"https://api.github.com/users/snicoll/following{/other_user}","gists_url":"https://api.github.com/users/snicoll/gists{/gist_id}","starred_url":"https://api.github.com/users/snicoll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snicoll/subscriptions","organizations_url":"https://api.github.com/users/snicoll/orgs","repos_url":"https://api.github.com/users/snicoll/repos","events_url":"https://api.github.com/users/snicoll/events{/privacy}","received_events_url":"https://api.github.com/users/snicoll/received_events","type":"User","site_admin":false},"body":"For the record, there is no need to use a name here, you can use the FQN. We use ASM to apply those conditions without loading the class.\r\n\r\nThis works when `@ConditionalOnClass` is at class level only (as in this case).","created_at":"2018-08-13T13:50:51Z","updated_at":"2018-08-13T13:52:36Z","html_url":"https://github.com/vaadin/spring/pull/336#discussion_r209615967","pull_request_url":"https://api.github.com/repos/vaadin/spring/pulls/336","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/vaadin/spring/pulls/comments/209615967"},"html":{"href":"https://github.com/vaadin/spring/pull/336#discussion_r209615967"},"pull_request":{"href":"https://api.github.com/repos/vaadin/spring/pulls/336"}}},"pull_request":{"url":"https://api.github.com/repos/vaadin/spring/pulls/336","id":207978146,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA3OTc4MTQ2","html_url":"https://github.com/vaadin/spring/pull/336","diff_url":"https://github.com/vaadin/spring/pull/336.diff","patch_url":"https://github.com/vaadin/spring/pull/336.patch","issue_url":"https://api.github.com/repos/vaadin/spring/issues/336","number":336,"state":"open","locked":false,"title":"Extract new DispatcherServletRegistrationBean into its own config","user":{"login":"denis-anisimov","id":11425472,"node_id":"MDQ6VXNlcjExNDI1NDcy","avatar_url":"https://avatars0.githubusercontent.com/u/11425472?v=4","gravatar_id":"","url":"https://api.github.com/users/denis-anisimov","html_url":"https://github.com/denis-anisimov","followers_url":"https://api.github.com/users/denis-anisimov/followers","following_url":"https://api.github.com/users/denis-anisimov/following{/other_user}","gists_url":"https://api.github.com/users/denis-anisimov/gists{/gist_id}","starred_url":"https://api.github.com/users/denis-anisimov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/denis-anisimov/subscriptions","organizations_url":"https://api.github.com/users/denis-anisimov/orgs","repos_url":"https://api.github.com/users/denis-anisimov/repos","events_url":"https://api.github.com/users/denis-anisimov/events{/privacy}","received_events_url":"https://api.github.com/users/denis-anisimov/received_events","type":"User","site_admin":false},"body":"\n\n<!-- Reviewable:start -->\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/vaadin/spring/336)\n<!-- Reviewable:end -->\n","created_at":"2018-08-13T13:29:50Z","updated_at":"2018-08-13T13:52:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6c20340dcc0e18dae3430debbf7a74d005b76d72","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/vaadin/spring/pulls/336/commits","review_comments_url":"https://api.github.com/repos/vaadin/spring/pulls/336/comments","review_comment_url":"https://api.github.com/repos/vaadin/spring/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vaadin/spring/issues/336/comments","statuses_url":"https://api.github.com/repos/vaadin/spring/statuses/b321d4b1aa721fb8b8eda5983b8d6e76292a2fe6","head":{"label":"vaadin:331-workaround","ref":"331-workaround","sha":"b321d4b1aa721fb8b8eda5983b8d6e76292a2fe6","user":{"login":"vaadin","id":1171922,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNzE5MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/1171922?v=4","gravatar_id":"","url":"https://api.github.com/users/vaadin","html_url":"https://github.com/vaadin","followers_url":"https://api.github.com/users/vaadin/followers","following_url":"https://api.github.com/users/vaadin/following{/other_user}","gists_url":"https://api.github.com/users/vaadin/gists{/gist_id}","starred_url":"https://api.github.com/users/vaadin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vaadin/subscriptions","organizations_url":"https://api.github.com/users/vaadin/orgs","repos_url":"https://api.github.com/users/vaadin/repos","events_url":"https://api.github.com/users/vaadin/events{/privacy}","received_events_url":"https://api.github.com/users/vaadin/received_events","type":"Organization","site_admin":false},"repo":{"id":30295072,"node_id":"MDEwOlJlcG9zaXRvcnkzMDI5NTA3Mg==","name":"spring","full_name":"vaadin/spring","owner":{"login":"vaadin","id":1171922,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNzE5MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/1171922?v=4","gravatar_id":"","url":"https://api.github.com/users/vaadin","html_url":"https://github.com/vaadin","followers_url":"https://api.github.com/users/vaadin/followers","following_url":"https://api.github.com/users/vaadin/following{/other_user}","gists_url":"https://api.github.com/users/vaadin/gists{/gist_id}","starred_url":"https://api.github.com/users/vaadin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vaadin/subscriptions","organizations_url":"https://api.github.com/users/vaadin/orgs","repos_url":"https://api.github.com/users/vaadin/repos","events_url":"https://api.github.com/users/vaadin/events{/privacy}","received_events_url":"https://api.github.com/users/vaadin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vaadin/spring","description":"Spring integration for Vaadin","fork":false,"url":"https://api.github.com/repos/vaadin/spring","forks_url":"https://api.github.com/repos/vaadin/spring/forks","keys_url":"https://api.github.com/repos/vaadin/spring/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vaadin/spring/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vaadin/spring/teams","hooks_url":"https://api.github.com/repos/vaadin/spring/hooks","issue_events_url":"https://api.github.com/repos/vaadin/spring/issues/events{/number}","events_url":"https://api.github.com/repos/vaadin/spring/events","assignees_url":"https://api.github.com/repos/vaadin/spring/assignees{/user}","branches_url":"https://api.github.com/repos/vaadin/spring/branches{/branch}","tags_url":"https://api.github.com/repos/vaadin/spring/tags","blobs_url":"https://api.github.com/repos/vaadin/spring/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vaadin/spring/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vaadin/spring/git/refs{/sha}","trees_url":"https://api.github.com/repos/vaadin/spring/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vaadin/spring/statuses/{sha}","languages_url":"https://api.github.com/repos/vaadin/spring/languages","stargazers_url":"https://api.github.com/repos/vaadin/spring/stargazers","contributors_url":"https://api.github.com/repos/vaadin/spring/contributors","subscribers_url":"https://api.github.com/repos/vaadin/spring/subscribers","subscription_url":"https://api.github.com/repos/vaadin/spring/subscription","commits_url":"https://api.github.com/repos/vaadin/spring/commits{/sha}","git_commits_url":"https://api.github.com/repos/vaadin/spring/git/commits{/sha}","comments_url":"https://api.github.com/repos/vaadin/spring/comments{/number}","issue_comment_url":"https://api.github.com/repos/vaadin/spring/issues/comments{/number}","contents_url":"https://api.github.com/repos/vaadin/spring/contents/{+path}","compare_url":"https://api.github.com/repos/vaadin/spring/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vaadin/spring/merges","archive_url":"https://api.github.com/repos/vaadin/spring/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vaadin/spring/downloads","issues_url":"https://api.github.com/repos/vaadin/spring/issues{/number}","pulls_url":"https://api.github.com/repos/vaadin/spring/pulls{/number}","milestones_url":"https://api.github.com/repos/vaadin/spring/milestones{/number}","notifications_url":"https://api.github.com/repos/vaadin/spring/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vaadin/spring/labels{/name}","releases_url":"https://api.github.com/repos/vaadin/spring/releases{/id}","deployments_url":"https://api.github.com/repos/vaadin/spring/deployments","created_at":"2015-02-04T11:11:27Z","updated_at":"2018-08-13T12:20:36Z","pushed_at":"2018-08-13T13:29:56Z","git_url":"git://github.com/vaadin/spring.git","ssh_url":"git@github.com:vaadin/spring.git","clone_url":"https://github.com/vaadin/spring.git","svn_url":"https://github.com/vaadin/spring","homepage":"https://vaadin.com/start","size":670,"stargazers_count":115,"watchers_count":115,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":78,"mirror_url":null,"archived":false,"open_issues_count":84,"license":null,"forks":78,"open_issues":84,"watchers":115,"default_branch":"master"}},"base":{"label":"vaadin:master","ref":"master","sha":"f3c312d827575dec0a24aacf27d786c57d1d4d65","user":{"login":"vaadin","id":1171922,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNzE5MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/1171922?v=4","gravatar_id":"","url":"https://api.github.com/users/vaadin","html_url":"https://github.com/vaadin","followers_url":"https://api.github.com/users/vaadin/followers","following_url":"https://api.github.com/users/vaadin/following{/other_user}","gists_url":"https://api.github.com/users/vaadin/gists{/gist_id}","starred_url":"https://api.github.com/users/vaadin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vaadin/subscriptions","organizations_url":"https://api.github.com/users/vaadin/orgs","repos_url":"https://api.github.com/users/vaadin/repos","events_url":"https://api.github.com/users/vaadin/events{/privacy}","received_events_url":"https://api.github.com/users/vaadin/received_events","type":"Organization","site_admin":false},"repo":{"id":30295072,"node_id":"MDEwOlJlcG9zaXRvcnkzMDI5NTA3Mg==","name":"spring","full_name":"vaadin/spring","owner":{"login":"vaadin","id":1171922,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExNzE5MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/1171922?v=4","gravatar_id":"","url":"https://api.github.com/users/vaadin","html_url":"https://github.com/vaadin","followers_url":"https://api.github.com/users/vaadin/followers","following_url":"https://api.github.com/users/vaadin/following{/other_user}","gists_url":"https://api.github.com/users/vaadin/gists{/gist_id}","starred_url":"https://api.github.com/users/vaadin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vaadin/subscriptions","organizations_url":"https://api.github.com/users/vaadin/orgs","repos_url":"https://api.github.com/users/vaadin/repos","events_url":"https://api.github.com/users/vaadin/events{/privacy}","received_events_url":"https://api.github.com/users/vaadin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vaadin/spring","description":"Spring integration for Vaadin","fork":false,"url":"https://api.github.com/repos/vaadin/spring","forks_url":"https://api.github.com/repos/vaadin/spring/forks","keys_url":"https://api.github.com/repos/vaadin/spring/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vaadin/spring/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vaadin/spring/teams","hooks_url":"https://api.github.com/repos/vaadin/spring/hooks","issue_events_url":"https://api.github.com/repos/vaadin/spring/issues/events{/number}","events_url":"https://api.github.com/repos/vaadin/spring/events","assignees_url":"https://api.github.com/repos/vaadin/spring/assignees{/user}","branches_url":"https://api.github.com/repos/vaadin/spring/branches{/branch}","tags_url":"https://api.github.com/repos/vaadin/spring/tags","blobs_url":"https://api.github.com/repos/vaadin/spring/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vaadin/spring/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vaadin/spring/git/refs{/sha}","trees_url":"https://api.github.com/repos/vaadin/spring/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vaadin/spring/statuses/{sha}","languages_url":"https://api.github.com/repos/vaadin/spring/languages","stargazers_url":"https://api.github.com/repos/vaadin/spring/stargazers","contributors_url":"https://api.github.com/repos/vaadin/spring/contributors","subscribers_url":"https://api.github.com/repos/vaadin/spring/subscribers","subscription_url":"https://api.github.com/repos/vaadin/spring/subscription","commits_url":"https://api.github.com/repos/vaadin/spring/commits{/sha}","git_commits_url":"https://api.github.com/repos/vaadin/spring/git/commits{/sha}","comments_url":"https://api.github.com/repos/vaadin/spring/comments{/number}","issue_comment_url":"https://api.github.com/repos/vaadin/spring/issues/comments{/number}","contents_url":"https://api.github.com/repos/vaadin/spring/contents/{+path}","compare_url":"https://api.github.com/repos/vaadin/spring/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vaadin/spring/merges","archive_url":"https://api.github.com/repos/vaadin/spring/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vaadin/spring/downloads","issues_url":"https://api.github.com/repos/vaadin/spring/issues{/number}","pulls_url":"https://api.github.com/repos/vaadin/spring/pulls{/number}","milestones_url":"https://api.github.com/repos/vaadin/spring/milestones{/number}","notifications_url":"https://api.github.com/repos/vaadin/spring/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vaadin/spring/labels{/name}","releases_url":"https://api.github.com/repos/vaadin/spring/releases{/id}","deployments_url":"https://api.github.com/repos/vaadin/spring/deployments","created_at":"2015-02-04T11:11:27Z","updated_at":"2018-08-13T12:20:36Z","pushed_at":"2018-08-13T13:29:56Z","git_url":"git://github.com/vaadin/spring.git","ssh_url":"git@github.com:vaadin/spring.git","clone_url":"https://github.com/vaadin/spring.git","svn_url":"https://github.com/vaadin/spring","homepage":"https://vaadin.com/start","size":670,"stargazers_count":115,"watchers_count":115,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":78,"mirror_url":null,"archived":false,"open_issues_count":84,"license":null,"forks":78,"open_issues":84,"watchers":115,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vaadin/spring/pulls/336"},"html":{"href":"https://github.com/vaadin/spring/pull/336"},"issue":{"href":"https://api.github.com/repos/vaadin/spring/issues/336"},"comments":{"href":"https://api.github.com/repos/vaadin/spring/issues/336/comments"},"review_comments":{"href":"https://api.github.com/repos/vaadin/spring/pulls/336/comments"},"review_comment":{"href":"https://api.github.com/repos/vaadin/spring/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vaadin/spring/pulls/336/commits"},"statuses":{"href":"https://api.github.com/repos/vaadin/spring/statuses/b321d4b1aa721fb8b8eda5983b8d6e76292a2fe6"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"snicoll"}}