Skip to content

BoundMethodParameter using it's own conversion service #426

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

Closed
kkondratov opened this issue Jan 14, 2016 · 1 comment
Closed

BoundMethodParameter using it's own conversion service #426

kkondratov opened this issue Jan 14, 2016 · 1 comment
Assignees

Comments

@kkondratov
Copy link

Using a ControllerLinkBuilder to build links to methods on RestControllers i.e.:

linkTo(methodOn(TestController.class).get(entity.getId())).withSelfRel()

Results in the AnnotatedParametersParameterAccessor parsing all the method parameters to strings when creating the links. When one uses a non standard object i.e. CompositePK this goes wrong since the DefaultFormattingConversionService does not know how to convert a CompositePK to a string. this results in an exception.

It is desirable that the BoundMethodParameter is instantiated with Springs conversion service if one is present and fall back to the DefaultFormattingConversionService. This way when a conversion has to take place between objects not registered by default like a CompositePK, and the converter is registered in springs conversion registry, the conversion will take place instead of throwing an exception.

@odrotbohm
Copy link
Member

Duplicates #118.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants