|
|
|
@ -16,6 +16,7 @@
@@ -16,6 +16,7 @@
|
|
|
|
|
package org.springframework.web.server.adapter; |
|
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.Arrays; |
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
import org.springframework.beans.factory.NoSuchBeanDefinitionException; |
|
|
|
@ -147,6 +148,17 @@ public class WebHttpHandlerBuilder {
@@ -147,6 +148,17 @@ public class WebHttpHandlerBuilder {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Add the given filter(s). |
|
|
|
|
* @param filters the filter(s) to add |
|
|
|
|
*/ |
|
|
|
|
public WebHttpHandlerBuilder filter(WebFilter... filters) { |
|
|
|
|
if (!ObjectUtils.isEmpty(filters)) { |
|
|
|
|
this.filters.addAll(Arrays.asList(filters)); |
|
|
|
|
} |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Add the given filters. |
|
|
|
|
* @param filters the filters to add |
|
|
|
@ -168,6 +180,17 @@ public class WebHttpHandlerBuilder {
@@ -168,6 +180,17 @@ public class WebHttpHandlerBuilder {
|
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Add the given exception handler(s). |
|
|
|
|
* @param handlers the exception handler(s) |
|
|
|
|
*/ |
|
|
|
|
public WebHttpHandlerBuilder exceptionHandler(WebExceptionHandler... handlers) { |
|
|
|
|
if (!ObjectUtils.isEmpty(handlers)) { |
|
|
|
|
this.exceptionHandlers.addAll(Arrays.asList(handlers)); |
|
|
|
|
} |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Add the given exception handlers. |
|
|
|
|
* @param handlers the exception handlers |
|
|
|
|