New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@Cacheable does not make sense when bean is depended by other bean which class implements FactoryBean [SPR-17471] #22003
Comments
Juergen Hoeller commented This can be an unfortunate consequence of early As for your specific scenario, I suppose your You could also declare the injection point where |
Nikolas Andr commented Hi Juergen Hoeller. |
Juergen Hoeller commented If you don't need |
Nikolas Andr commented Juergen Hoeller Could you please show how bean should be set via spring xml if to use ObjectProvider? Maybe the issue is that not the bean directly is set to other bean but a map of beans, it throws now
Cannot convert value of type [com.l.DefaultProductBuyableStrategy] to required type [org.springframework.beans.factory.ObjectProvider] for property 'implMapping[site-mx]': no matching editors or conversion strategy found |
Juergen Hoeller commented Hmm, so it's an explicitly configured bean reference, not an That said, I wonder why your |
Nikolas Andr opened SPR-17471 and commented
The next case does not work when cacheable behavior is desired
Bean A has methods with annotation
@Cachable
. Bean B a has dependency on Bean A and also Bean B implements org.springframework.beans.factory.FactoryBean and Spring initializes Bean B before enabling caching(when proxies are created for beans which methods have annotation@Cacheable
)Affects: 4.3.20
The text was updated successfully, but these errors were encountered: