-
Notifications
You must be signed in to change notification settings - Fork 472
Open
Description
In building some infrastructure, we want to use a Map for the path variables
public List<Resource> list(@PathVariable Map<String, String> pathVariables) { ... }
However when we want to build a list using a map:
methodOn(TheController.class).list(mapOfPathVariables)
We get:
org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [@org.springframework.web.bind.annotation.PathVariable java.util.Map<java.lang.String, java.lang.String>] to type [java.lang.String]
at org.springframework.core.convert.support.GenericConversionService.handleConverterNotFound(GenericConversionService.java:324) ~[spring-core-4.3.5.RELEASE.jar:4.3.5.RELEASE]
at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:206) ~[spring-core-4.3.5.RELEASE.jar:4.3.5.RELEASE]
at org.springframework.hateoas.mvc.AnnotatedParametersParameterAccessor$BoundMethodParameter.asString(AnnotatedParametersParameterAccessor.java:192) ~[spring-hateoas-0.23.0.RELEASE.jar:na]
at org.springframework.hateoas.mvc.ControllerLinkBuilderFactory.linkTo(ControllerLinkBuilderFactory.java:150) ~[spring-hateoas-0.23.0.RELEASE.jar:na]
at org.springframework.hateoas.mvc.ControllerLinkBuilder.linkTo(ControllerLinkBuilder.java:193) ~[spring-hateoas-0.23.0.RELEASE.jar:na]
Looking at exiting PRs, it seems that a similar issue for property placeholders is in progress on @gregturn's PR #602
Metadata
Metadata
Assignees
Labels
No labels