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

AnnotatedParametersParameterAccessor uses DefaultFormattingConversionService #149

Closed
nickspacek opened this issue Feb 7, 2014 · 1 comment
Assignees
Milestone

Comments

@nickspacek
Copy link

Unless I'm missing something, the use of DefaultFormattingConversionService means there is no way to support custom parameters in MVC Controllers using (for example) linkTo/methodOn. If I have a controller method like this:

@RequestMapping(/{vegetableId}
public void get(@PathVariable("vegetableId") Vegetable vegetable)

Then even if I register a custom Converter to convert the object to a string representation, the linkTo/methodOn won't work because the Converter isn't part of the DefaultFormattingConversionService. Shouldn't the AnnotatedParametersParameterAccessor be referencing a ConversionService from the ApplicationContext?

gregturn added a commit that referenced this issue Aug 28, 2017
Existing ConversionService is fixed as a static inside BoundMethodParameter. This introduces ability to inject an alternative ConversionService.

Related issues: #352, #149
@odrotbohm odrotbohm added this to the 1.3 M2 milestone Jan 25, 2021
@odrotbohm odrotbohm self-assigned this Jan 25, 2021
@odrotbohm
Copy link
Member

Duplicates #118.

odrotbohm added a commit that referenced this issue Jan 25, 2021
We now look up the ConversionService available in the ApplicationContext from Web(Mvc|Flux)LinkBuilder. Some API tweaks to WebHandler to allow the lookup from the current request. The general fallback is now the invocation of …toString() on the parameter value.

Fixes #118, #352, #144, #149.
odrotbohm added a commit that referenced this issue Jan 25, 2021
We now look up the ConversionService available in the ApplicationContext from Web(Mvc|Flux)LinkBuilder. Some API tweaks to WebHandler to allow the lookup from the current request. The general fallback is now the invocation of …toString() on the parameter value.

Fixes #118, #352, #144, #149.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants