#70 - Fixed link build for controllers with type-level mapping parameters.
This commit is contained in:
committed by
Oliver Gierke
parent
0f5afe02ab
commit
3f995ee8f0
@@ -49,6 +49,7 @@ import org.springframework.web.util.UriTemplate;
|
||||
*
|
||||
* @author Ricardo Gladwell
|
||||
* @author Oliver Gierke
|
||||
* @author Dietrich Schulten
|
||||
*/
|
||||
public class ControllerLinkBuilderFactory implements MethodLinkBuilderFactory<ControllerLinkBuilder> {
|
||||
|
||||
@@ -109,10 +110,9 @@ public class ControllerLinkBuilderFactory implements MethodLinkBuilderFactory<Co
|
||||
UriTemplate template = new UriTemplate(mapping);
|
||||
Map<String, Object> values = new HashMap<String, Object>();
|
||||
|
||||
if (classMappingParameters.hasNext()) {
|
||||
for (String variable : template.getVariableNames()) {
|
||||
values.put(variable, classMappingParameters.next());
|
||||
}
|
||||
Iterator<String> names = template.getVariableNames().iterator();
|
||||
while (classMappingParameters.hasNext()) {
|
||||
values.put(names.next(), classMappingParameters.next());
|
||||
}
|
||||
|
||||
for (BoundMethodParameter parameter : PATH_VARIABLE_ACCESSOR.getBoundParameters(invocation)) {
|
||||
|
||||
Reference in New Issue
Block a user