Don't make assumptions about the UriTemplateHandler
Fixes gh-115
This commit is contained in:
@@ -25,6 +25,11 @@
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||
|
||||
@@ -66,7 +66,6 @@ import org.springframework.web.context.request.WebRequest;
|
||||
import org.springframework.web.method.support.ModelAndViewContainer;
|
||||
import org.springframework.web.servlet.HandlerMapping;
|
||||
import org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor;
|
||||
import org.springframework.web.util.AbstractUriTemplateHandler;
|
||||
|
||||
/**
|
||||
* A <code>@RequestMapping</code> argument type that can proxy the request to a backend.
|
||||
@@ -463,9 +462,7 @@ public class ProxyExchange<T> {
|
||||
NestedTemplate rest = new NestedTemplate();
|
||||
rest.setMessageConverters(input.getMessageConverters());
|
||||
rest.setErrorHandler(input.getErrorHandler());
|
||||
rest.setDefaultUriVariables(
|
||||
((AbstractUriTemplateHandler) input.getUriTemplateHandler())
|
||||
.getDefaultUriVariables());
|
||||
rest.setUriTemplateHandler(input.getUriTemplateHandler());
|
||||
rest.setRequestFactory(input.getRequestFactory());
|
||||
rest.setInterceptors(input.getInterceptors());
|
||||
return rest;
|
||||
|
||||
Reference in New Issue
Block a user