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);
OperationArgumentResolver serverNamespaceArgumentResolver = OperationArgumentResolver
.of(WebServerNamespace.class, () -> WebServerNamespace
.from(WebServerApplicationContext.getServerNamepace(exchange.getApplicationContext())));
.from(WebServerApplicationContext.getServerNamespace(exchange.getApplicationContext())));
return this.securityContextSupplier.get()
.map((securityContext) -> new InvocationContext(securityContext, arguments,
serverNamespaceArgumentResolver,

View File

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

View File

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