This commit is contained in:
Stephane Nicoll 2021-08-12 11:32:18 +02:00
parent 2b1523b35e
commit 57050fade4
3 changed files with 3 additions and 3 deletions

View File

@ -312,7 +312,7 @@ public abstract class AbstractWebFluxEndpointHandlerMapping extends RequestMappi
Map<String, Object> arguments = getArguments(exchange, body); Map<String, Object> arguments = getArguments(exchange, body);
OperationArgumentResolver serverNamespaceArgumentResolver = OperationArgumentResolver OperationArgumentResolver serverNamespaceArgumentResolver = OperationArgumentResolver
.of(WebServerNamespace.class, () -> WebServerNamespace .of(WebServerNamespace.class, () -> WebServerNamespace
.from(WebServerApplicationContext.getServerNamepace(exchange.getApplicationContext()))); .from(WebServerApplicationContext.getServerNamespace(exchange.getApplicationContext())));
return this.securityContextSupplier.get() return this.securityContextSupplier.get()
.map((securityContext) -> new InvocationContext(securityContext, arguments, .map((securityContext) -> new InvocationContext(securityContext, arguments,
serverNamespaceArgumentResolver, serverNamespaceArgumentResolver,

View File

@ -303,7 +303,7 @@ public abstract class AbstractWebMvcEndpointHandlerMapping extends RequestMappin
WebApplicationContext applicationContext = WebApplicationContextUtils WebApplicationContext applicationContext = WebApplicationContextUtils
.getRequiredWebApplicationContext(request.getServletContext()); .getRequiredWebApplicationContext(request.getServletContext());
return WebServerNamespace return WebServerNamespace
.from(WebServerApplicationContext.getServerNamepace(applicationContext)); .from(WebServerApplicationContext.getServerNamespace(applicationContext));
}); });
InvocationContext invocationContext = new InvocationContext(securityContext, arguments, InvocationContext invocationContext = new InvocationContext(securityContext, arguments,
serverNamespaceArgumentResolver, producibleOperationArgumentResolver); serverNamespaceArgumentResolver, producibleOperationArgumentResolver);

View File

@ -66,7 +66,7 @@ public interface WebServerApplicationContext extends ApplicationContext {
* {@link WebServerApplicationContext} * {@link WebServerApplicationContext}
* @since 2.6.0 * @since 2.6.0
*/ */
static String getServerNamepace(ApplicationContext context) { static String getServerNamespace(ApplicationContext context) {
return (context instanceof WebServerApplicationContext) return (context instanceof WebServerApplicationContext)
? ((WebServerApplicationContext) context).getServerNamespace() : null; ? ((WebServerApplicationContext) context).getServerNamespace() : null;