bindToApplicatonContext uses WebSessionManager bean

Issue: SPR-17094
This commit is contained in:
Rossen Stoyanchev
2018-07-26 15:52:36 -04:00
parent c022f7c19d
commit bcb485b5ed
3 changed files with 109 additions and 3 deletions

View File

@@ -240,8 +240,17 @@ public final class WebHttpHandlerBuilder {
}
/**
* Configure the {@link ServerCodecConfigurer} to set on the
* {@link ServerWebExchange WebServerExchange}.
* Whether a {@code WebSessionManager} is configured or not, either
* detected from an {@code ApplicationContext} or explicitly configured via
* {@link #sessionManager(WebSessionManager)}.
* @since 5.0.9
*/
public boolean hasSessionManager() {
return this.sessionManager != null;
}
/**
* Configure the {@link ServerCodecConfigurer} to set on the {@code WebServerExchange}.
* @param codecConfigurer the codec configurer
*/
public WebHttpHandlerBuilder codecConfigurer(ServerCodecConfigurer codecConfigurer) {
@@ -249,6 +258,17 @@ public final class WebHttpHandlerBuilder {
return this;
}
/**
* Whether a {@code ServerCodecConfigurer} is configured or not, either
* detected from an {@code ApplicationContext} or explicitly configured via
* {@link #codecConfigurer(ServerCodecConfigurer)}.
* @since 5.0.9
*/
public boolean hasCodecConfigurer() {
return this.codecConfigurer != null;
}
/**
* Configure the {@link LocaleContextResolver} to set on the
* {@link ServerWebExchange WebServerExchange}.
@@ -259,6 +279,16 @@ public final class WebHttpHandlerBuilder {
return this;
}
/**
* Whether a {@code LocaleContextResolver} is configured or not, either
* detected from an {@code ApplicationContext} or explicitly configured via
* {@link #localeContextResolver(LocaleContextResolver)}.
* @since 5.0.9
*/
public boolean hasLocaleContextResolver() {
return this.localeContextResolver != null;
}
/**
* Build the {@link HttpHandler}.