Skip to content
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

Inject dependencies into @Configurable objects before readResolve() [SPR-10922] #15550

Closed
spring-issuemaster opened this issue Sep 16, 2013 · 1 comment

Comments

@spring-issuemaster
Copy link
Collaborator

@spring-issuemaster spring-issuemaster commented Sep 16, 2013

Sam Couter opened SPR-10922 and commented

Using AnnotationBeanConfigurerAspect, dependencies are injected into @Configurable annotated objects after readResolve has been executed. In my use case, I serialise only the key value for my object and wish to use readResolve to replace the deserialised value with the equivalent bean from the Spring bean factory in the deserialising context.

To do this, I require injection of dependencies before readResolve.

My solution has been to create another aspect using before to advise readResolve instead of after. A more robust solution might add another attribute to @Configurable to control when injection occurs, similarly to the existing preConstruction.


No further details from SPR-10922

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Jan 12, 2019

Bulk closing outdated, unresolved issues. Please, reopen if still relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.