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

Register Printer<T> and Parser<T> beans as converters #17064

Closed
wants to merge 1 commit into from

Conversation

nosan
Copy link
Contributor

@nosan nosan commented Jun 5, 2019

Registers Printer<T> and Parser<T> as converters if they have been exposed as beans.

see gh-16171

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jun 5, 2019
@nosan nosan force-pushed the gh-16171 branch 4 times, most recently from 7ae0f88 to 0fb801a Compare June 10, 2019 13:16
@philwebb philwebb added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Jun 10, 2019
@philwebb philwebb added this to the 2.2.x milestone Jun 10, 2019
@philwebb
Copy link
Member

I raise spring-projects/spring-framework#23110 to see if we can't improve Spring Framework first. It's a bit nasty that we need new PrintConverter and ParseConverter public classes.

@philwebb philwebb added the status: blocked An issue that's blocked on an external project change label Jun 11, 2019
@philwebb philwebb self-assigned this Jun 11, 2019
philwebb pushed a commit that referenced this pull request Jun 13, 2019
Update `WebMvcAutoConfiguration` and `WebFluxAutoConfiguration` so that
`Printer<T>` and `Parser<T>` beans are automatically registered with
the conversion service.

Prior to this commit only `GenericConverter`, `Converter` and
`Formatter` beans were automatically registered.

See gh-17064
philwebb added a commit that referenced this pull request Jun 13, 2019
Extract common registration code and make use of the Spring Framework
registration methods.

See gh-17064
@philwebb philwebb closed this in 0f642df Jun 13, 2019
@philwebb
Copy link
Member

Thanks for the PR @nosan! This is now in master. With the spring-projects/spring-framework#23110 change I've been able to simplify it as we no longer need our own PrinterConverter and ParserConverter classes.

@philwebb philwebb modified the milestones: 2.2.x, 2.2.0.M4 Jun 13, 2019
@nosan
Copy link
Contributor Author

nosan commented Jun 13, 2019

Thank you very much @philwebb

@nosan nosan deleted the gh-16171 branch June 13, 2019 17:34
@wilkinsona wilkinsona changed the title Registers Printer<T> and Parser<T> as converters Register Printer<T> and Parser<T> beans as converters Jun 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: blocked An issue that's blocked on an external project change type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants