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

GenericConversionService calls initGenericConverters from constructor [SPR-6149] #10817

Closed
spring-projects-issues opened this issue Sep 24, 2009 · 1 comment
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

Marten Deinum opened SPR-6149 and commented

This actually arised as a WebFlow issue not sure if I need to register one for that also.

Basically when you need your own ConversionService and you extend the GenericConversionService and you need some depenencies injected those aren't available in the overriden initGenericConverters because it is called from the parents constructor. IMHO it would be more spring like that this method was called after all dependencies where injected so let it implement InitializingBean and implement the afterPropertiesSet method. That way it would work and would be more elegant imho.


Affects: 3.0 M4

Reference URL: http://forum.springsource.org/showthread.php?t=78098

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

Good point. I removed those protected converter initialization hooks completely since it doesn't make much sense to override them. Subclasses should rather add further converters in their own constructors, or in their afterPropertiesSet method if they prefer.

Juergen

@spring-projects-issues spring-projects-issues added type: enhancement A general enhancement in: core Issues in core modules (aop, beans, core, context, expression) labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 3.0 RC1 milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants