{"action":"created","issue":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/15048","repository_url":"https://api.github.com/repos/spring-projects/spring-boot","labels_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/15048/labels{/name}","comments_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/15048/comments","events_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/15048/events","html_url":"https://github.com/spring-projects/spring-boot/issues/15048","id":376144528,"node_id":"MDU6SXNzdWUzNzYxNDQ1Mjg=","number":15048,"title":"Application that depends upon spring-boot-starter-web and spring-boot-starter-jersey fails to start due to attempt to override requestContextFilter bean","user":{"login":"wilkinsona","id":914682,"node_id":"MDQ6VXNlcjkxNDY4Mg==","avatar_url":"https://avatars3.githubusercontent.com/u/914682?v=4","gravatar_id":"","url":"https://api.github.com/users/wilkinsona","html_url":"https://github.com/wilkinsona","followers_url":"https://api.github.com/users/wilkinsona/followers","following_url":"https://api.github.com/users/wilkinsona/following{/other_user}","gists_url":"https://api.github.com/users/wilkinsona/gists{/gist_id}","starred_url":"https://api.github.com/users/wilkinsona/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilkinsona/subscriptions","organizations_url":"https://api.github.com/users/wilkinsona/orgs","repos_url":"https://api.github.com/users/wilkinsona/repos","events_url":"https://api.github.com/users/wilkinsona/events{/privacy}","received_events_url":"https://api.github.com/users/wilkinsona/received_events","type":"User","site_admin":false},"labels":[{"id":78544176,"node_id":"MDU6TGFiZWw3ODU0NDE3Ng==","url":"https://api.github.com/repos/spring-projects/spring-boot/labels/type:%20regression","name":"type: regression","color":"d4c5f9","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/spring-projects/spring-boot/milestones/125","html_url":"https://github.com/spring-projects/spring-boot/milestone/125","labels_url":"https://api.github.com/repos/spring-projects/spring-boot/milestones/125/labels","id":3781451,"node_id":"MDk6TWlsZXN0b25lMzc4MTQ1MQ==","number":125,"title":"2.1.1","description":"","creator":{"login":"wilkinsona","id":914682,"node_id":"MDQ6VXNlcjkxNDY4Mg==","avatar_url":"https://avatars3.githubusercontent.com/u/914682?v=4","gravatar_id":"","url":"https://api.github.com/users/wilkinsona","html_url":"https://github.com/wilkinsona","followers_url":"https://api.github.com/users/wilkinsona/followers","following_url":"https://api.github.com/users/wilkinsona/following{/other_user}","gists_url":"https://api.github.com/users/wilkinsona/gists{/gist_id}","starred_url":"https://api.github.com/users/wilkinsona/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilkinsona/subscriptions","organizations_url":"https://api.github.com/users/wilkinsona/orgs","repos_url":"https://api.github.com/users/wilkinsona/repos","events_url":"https://api.github.com/users/wilkinsona/events{/privacy}","received_events_url":"https://api.github.com/users/wilkinsona/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":69,"state":"closed","created_at":"2018-10-30T11:49:54Z","updated_at":"2018-11-30T10:08:04Z","due_on":"2018-11-30T08:00:00Z","closed_at":"2018-11-30T10:08:04Z"},"comments":7,"created_at":"2018-10-31T20:21:32Z","updated_at":"2018-12-17T17:50:09Z","closed_at":"2018-11-27T15:40:43Z","author_association":"MEMBER","body":"As reported in [this question](https://stackoverflow.com/questions/53091306/spring-boot-2-1-0-with-jersey) on Stack Overflow, an app that depends on both `spring-boot-starter-web` and `spring-boot-starter-jersey` will fail to start. It fails with the following output:\r\n\r\n```\r\n***************************\r\nAPPLICATION FAILED TO START\r\n***************************\r\n\r\nDescription:\r\n\r\nThe bean 'requestContextFilter', defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter.class], could not be registered. A bean with that name has already been defined in class path resource [org/springframework/boot/autoconfigure/jersey/JerseyAutoConfiguration.class] and overriding is disabled.\r\n\r\nAction:\r\n\r\nConsider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true\r\n```\r\n\r\nThere's, presumably, a bug or at least some unintended behaviour in 2.0 and perhaps 1.5 as well with the `requestContextFilter` bean being overridden. It fails hard on 2.1 due to bean overriding now being disabled by default."},"comment":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/comments/447935462","html_url":"https://github.com/spring-projects/spring-boot/issues/15048#issuecomment-447935462","issue_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/15048","id":447935462,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NzkzNTQ2Mg==","user":{"login":"andrei-ivanov","id":6377070,"node_id":"MDQ6VXNlcjYzNzcwNzA=","avatar_url":"https://avatars3.githubusercontent.com/u/6377070?v=4","gravatar_id":"","url":"https://api.github.com/users/andrei-ivanov","html_url":"https://github.com/andrei-ivanov","followers_url":"https://api.github.com/users/andrei-ivanov/followers","following_url":"https://api.github.com/users/andrei-ivanov/following{/other_user}","gists_url":"https://api.github.com/users/andrei-ivanov/gists{/gist_id}","starred_url":"https://api.github.com/users/andrei-ivanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrei-ivanov/subscriptions","organizations_url":"https://api.github.com/users/andrei-ivanov/orgs","repos_url":"https://api.github.com/users/andrei-ivanov/repos","events_url":"https://api.github.com/users/andrei-ivanov/events{/privacy}","received_events_url":"https://api.github.com/users/andrei-ivanov/received_events","type":"User","site_admin":false},"created_at":"2018-12-17T17:50:09Z","updated_at":"2018-12-17T17:50:09Z","author_association":"NONE","body":"Trying to upgrade from 2.0 to 2.1, I seem to have ran into an issue cause by the disappearance of this filters' registration:\r\n\r\n> Caused by: java.lang.IllegalStateException: No thread-bound request found: Are you referring to request attributes outside of an actual web request, or processing a request outside of the originally receiving thread? If you are actually operating within a web request and still receive this message, your code is probably running outside of DispatcherServlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request.\r\n       at org.springframework.web.context.request.RequestContextHolder.currentRequestAttributes(RequestContextHolder.java:131) ~[spring-web-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]\r\n       at org.springframework.web.context.request.AbstractRequestAttributesScope.get(AbstractRequestAttributesScope.java:42) ~[spring-web-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]\r\n       at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:353) ~[spring-beans-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]\r\n\r\nAs far as I understand, it's caused by proxy instance of a bean marked with `@RequestScope`, and even though this happens during an HTTP request, it fails to `getBean` because the `RequestContextFilter` isn't around anymore to initialize the attributes.\r\n\r\nI assume the fix would be to register the filter manually?"}}
{"actor":{"display_login":"andrei-ivanov"}}