Add WebTestClientConfigurer
Issue: SPR-15674
This commit is contained in:
@@ -96,6 +96,19 @@ public class WebHttpHandlerBuilder {
|
||||
this.webHandler = webHandler;
|
||||
}
|
||||
|
||||
/**
|
||||
* Copy constructor.
|
||||
*/
|
||||
private WebHttpHandlerBuilder(WebHttpHandlerBuilder other) {
|
||||
|
||||
this.webHandler = other.webHandler;
|
||||
this.filters.addAll(other.filters);
|
||||
this.exceptionHandlers.addAll(other.exceptionHandlers);
|
||||
this.sessionManager = other.sessionManager;
|
||||
this.codecConfigurer = other.codecConfigurer;
|
||||
this.localeContextResolver = other.localeContextResolver;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Static factory method to create a new builder instance.
|
||||
@@ -263,6 +276,14 @@ public class WebHttpHandlerBuilder {
|
||||
return adapted;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clone this {@link WebHttpHandlerBuilder}.
|
||||
* @return the cloned builder instance
|
||||
*/
|
||||
public WebHttpHandlerBuilder cloneBuilder() {
|
||||
return new WebHttpHandlerBuilder(this);
|
||||
}
|
||||
|
||||
|
||||
private static class SortedBeanContainer {
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package org.springframework.web.server.handler;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@@ -40,7 +41,7 @@ public class ExceptionHandlingWebHandler extends WebHandlerDecorator {
|
||||
|
||||
public ExceptionHandlingWebHandler(WebHandler delegate, List<WebExceptionHandler> handlers) {
|
||||
super(delegate);
|
||||
this.exceptionHandlers = Collections.unmodifiableList(handlers);
|
||||
this.exceptionHandlers = Collections.unmodifiableList(new ArrayList<>(handlers));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user