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

Provide a formatter registry capability local to a controller [SPR-7773] #12429

spring-issuemaster opened this issue Nov 30, 2010 · 1 comment


None yet
2 participants
Copy link

commented Nov 30, 2010

Rossen Stoyanchev opened SPR-7773 and commented

Currently a single ConversionService is used globally in a DispatcherServlet. It would be useful for controllers to be able to register converters and formatters locally for a given DataBinder instance without affecting the global ConversionService instance (for example ROO-1655).

Something along the lines of:

Affects: 3.0.5

Issue Links:

  • #10737 No way to register Formatter instances by field on DataBinder

Referenced from: commits dc39e35, 02da2e8

4 votes, 5 watchers


This comment has been minimized.

Copy link
Collaborator Author

commented May 12, 2015

Juergen Hoeller commented

I'm introducing addCustomFormatter(Formatter formatter, String... fields) and addCustomFormatter(Formatter formatter, Class... fieldTypes) to DataBinder, internally adapting the given Formatter to a PropertyEditor and registering that adapter with the underlying PropertyEditorRegistry, following the usual rules there. This is a quite simple and straighforward approach which should hopefully cover the typical use case here, without having to build an extra local ConversionService underneath the covers.


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