|
|
|
@ -245,12 +245,12 @@ public class RedirectView extends AbstractUrlBasedView { |
|
|
|
String name = matcher.group(1); |
|
|
|
String name = matcher.group(1); |
|
|
|
Object value = (model.containsKey(name) ? model.get(name) : uriVariables.get(name)); |
|
|
|
Object value = (model.containsKey(name) ? model.get(name) : uriVariables.get(name)); |
|
|
|
Assert.notNull(value, () -> "No value for URI variable '" + name + "'"); |
|
|
|
Assert.notNull(value, () -> "No value for URI variable '" + name + "'"); |
|
|
|
result.append(targetUrl.substring(endLastMatch, matcher.start())); |
|
|
|
result.append(targetUrl, endLastMatch, matcher.start()); |
|
|
|
result.append(encodeUriVariable(value.toString())); |
|
|
|
result.append(encodeUriVariable(value.toString())); |
|
|
|
endLastMatch = matcher.end(); |
|
|
|
endLastMatch = matcher.end(); |
|
|
|
found = matcher.find(); |
|
|
|
found = matcher.find(); |
|
|
|
} |
|
|
|
} |
|
|
|
result.append(targetUrl.substring(endLastMatch, targetUrl.length())); |
|
|
|
result.append(targetUrl.substring(endLastMatch)); |
|
|
|
return result; |
|
|
|
return result; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|