You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The 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?
Note: There is a valid workaround, just use the old @Scope annotation. That does not register another bean name
The text was updated successfully, but these errors were encountered:
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 withoriginalBeanName
andscopedTarget.originalBeanName
as bean name entries in the context for the affected class.The specific piece that breaks is:
The 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?Note: There is a valid workaround, just use the old
@Scope
annotation. That does not register another bean nameThe text was updated successfully, but these errors were encountered: