Title: Spring RequestScope breaks SpringComponentProvider · Issue #3789 · javaee/jersey · GitHub
Open Graph Title: Spring RequestScope breaks SpringComponentProvider · Issue #3789 · javaee/jersey
X Title: Spring RequestScope breaks SpringComponentProvider · Issue #3789 · javaee/jersey
Description: Utilizing the new(ish) @RequestScope annotation causes integration issues as Spring is registering multiple bean names when this annotation is present. You now end up with originalBeanName and scopedTarget.originalBeanName as bean name e...
Open Graph Description: Utilizing the new(ish) @RequestScope annotation causes integration issues as Spring is registering multiple bean names when this annotation is present. You now end up with originalBeanName and scop...
X Description: Utilizing the new(ish) @RequestScope annotation causes integration issues as Spring is registering multiple bean names when this annotation is present. You now end up with originalBeanName and scop...
Opengraph URL: https://github.com/javaee/jersey/issues/3789
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Spring RequestScope breaks SpringComponentProvider","articleBody":"Utilizing the new(ish) `@RequestScope` annotation causes integration issues as Spring is registering multiple bean names when this annotation is present. You now end up with `originalBeanName` and `scopedTarget.originalBeanName` as bean name entries in the context for the affected class.\r\n\r\nThe specific piece that breaks is: \r\n\r\n if (beanNames == null || beanNames.length != 1) {\r\n LOGGER.severe(LocalizationMessages.NONE_OR_MULTIPLE_BEANS_AVAILABLE(component));\r\n return false;\r\n }\r\n\r\nThe application still actually works in my parituclar case as Jersey was able to use the constructor and populate the other requested beans (from spring). This is dangerous though, as it will have hidden side affects as the resources is not actually being provided by Spring when we expect to be and things like `@Transactional` or other Spring specific things will fail. This seems like a red flag as well, should something more severe be done in these cases? Fail faster?\r\n\r\n**Note:** There is a valid workaround, just use the old `@Scope` annotation. That does not register another bean name\r\n","author":{"url":"https://github.com/nick-pww","@type":"Person","name":"nick-pww"},"datePublished":"2018-03-21T19:49:03.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/3789/jersey/issues/3789"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:058a2d98-7f71-5850-7419-de67c9aac6b7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9F30:11D0F0:287616A:3575A0A:6992E453 |
| html-safe-nonce | 201a741c2e4cf2ae3a4a6af8818fd5967ebf023908e6755b47ad366a7e2b1c7e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RjMwOjExRDBGMDoyODc2MTZBOjM1NzVBMEE6Njk5MkU0NTMiLCJ2aXNpdG9yX2lkIjoiODEwNzkxNjAyNzY2MzQxMDI1OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c66e356119ea464f0231f40455778de3c9ee38072228398552b64c074969e218 |
| hovercard-subject-tag | issue:307393633 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/javaee/jersey/3789/issue_layout |
| twitter:image | https://opengraph.githubassets.com/06dfcc4c6dea78ad2677b23e78b8262445e3b18b0b044cc13f4502e3bd9a243e/javaee/jersey/issues/3789 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/06dfcc4c6dea78ad2677b23e78b8262445e3b18b0b044cc13f4502e3bd9a243e/javaee/jersey/issues/3789 |
| og:image:alt | Utilizing the new(ish) @RequestScope annotation causes integration issues as Spring is registering multiple bean names when this annotation is present. You now end up with originalBeanName and scop... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | nick-pww |
| hostname | github.com |
| expected-hostname | github.com |
| None | 42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b |
| turbo-cache-control | no-preview |
| go-import | github.com/javaee/jersey git https://github.com/javaee/jersey.git |
| octolytics-dimension-user_id | 23086798 |
| octolytics-dimension-user_login | javaee |
| octolytics-dimension-repository_id | 4368712 |
| octolytics-dimension-repository_nwo | javaee/jersey |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 4368712 |
| octolytics-dimension-repository_network_root_nwo | javaee/jersey |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 84dcb133269e3cfe6e0296cc85fbacb92cae92bb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width