Class ThymeleafReactiveView
Object
org.springframework.web.reactive.result.view.AbstractView
org.thymeleaf.spring5.view.reactive.ThymeleafReactiveView
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanNameAware
,org.springframework.context.ApplicationContextAware
,org.springframework.web.reactive.result.view.View
public class ThymeleafReactiveView
extends org.springframework.web.reactive.result.view.AbstractView
implements org.springframework.beans.factory.BeanNameAware
Base implementation of the Spring WebFlux View
interface.
Views represent a template being executed, after being resolved (and
instantiated) by a ViewResolver
.
This is the default view implementation resolved by ThymeleafReactiveViewResolver
.
This view needs a ISpringWebFluxTemplateEngine
for execution, and it will call its
ISpringWebFluxTemplateEngine.processStream(String, Set, IContext, DataBufferFactory, MediaType, Charset, int)
method to create the reactive data streams to be used for processing the template. See the documentation
of this class to know more about the different operation modes available.
- Since:
- 3.0.3
- Author:
- Daniel Fernández
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
By default, no max response chunk size is set.protected static final org.slf4j.Logger
Fields inherited from class org.springframework.web.reactive.result.view.AbstractView
REQUEST_DATA_VALUE_PROCESSOR_BEAN_NAME
Fields inherited from interface org.springframework.web.reactive.result.view.View
BINDING_CONTEXT_ATTRIBUTE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addStaticVariable
(String name, Object value) protected Locale
int
protected ISpringWebFluxTemplateEngine
reactor.core.publisher.Mono<Void>
render
(Map<String, ?> model, org.springframework.http.MediaType contentType, org.springframework.web.server.ServerWebExchange exchange) protected reactor.core.publisher.Mono<Void>
renderFragmentInternal
(Set<String> markupSelectorsToRender, Map<String, Object> renderAttributes, org.springframework.http.MediaType contentType, org.springframework.web.server.ServerWebExchange exchange) protected reactor.core.publisher.Mono<Void>
renderInternal
(Map<String, Object> renderAttributes, org.springframework.http.MediaType contentType, org.springframework.web.server.ServerWebExchange exchange) void
setBeanName
(String beanName) void
setDefaultCharset
(Charset defaultCharset) protected void
void
setMarkupSelector
(String markupSelector) void
setResponseMaxChunkSizeBytes
(int responseMaxBufferSizeBytes) void
setStaticVariables
(Map<String, ?> variables) void
setSupportedMediaTypes
(List<org.springframework.http.MediaType> supportedMediaTypes) protected void
setTemplateEngine
(ISpringWebFluxTemplateEngine templateEngine) void
setTemplateName
(String templateName) Methods inherited from class org.springframework.web.reactive.result.view.AbstractView
createRequestContext, formatViewName, getApplicationContext, getDefaultCharset, getModelAttributes, getRequestContextAttribute, getRequestDataValueProcessor, getSupportedMediaTypes, obtainApplicationContext, resolveAsyncAttributes, resolveAsyncAttributes, setApplicationContext, setRequestContextAttribute, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.springframework.web.reactive.result.view.View
isRedirectView
-
Field Details
-
logger
protected static final org.slf4j.Logger logger -
DEFAULT_RESPONSE_CHUNK_SIZE_BYTES
public static final int DEFAULT_RESPONSE_CHUNK_SIZE_BYTESBy default, no max response chunk size is set. Value =Integer.MAX_VALUE
- See Also:
-
-
Constructor Details
-
ThymeleafReactiveView
public ThymeleafReactiveView()
-
-
Method Details
-
getMarkupSelector
-
setMarkupSelector
-
setDefaultCharset
- Overrides:
setDefaultCharset
in classorg.springframework.web.reactive.result.view.AbstractView
-
setSupportedMediaTypes
- Overrides:
setSupportedMediaTypes
in classorg.springframework.web.reactive.result.view.AbstractView
-
getBeanName
- Overrides:
getBeanName
in classorg.springframework.web.reactive.result.view.AbstractView
-
setBeanName
- Specified by:
setBeanName
in interfaceorg.springframework.beans.factory.BeanNameAware
- Overrides:
setBeanName
in classorg.springframework.web.reactive.result.view.AbstractView
-
getTemplateName
-
setTemplateName
-
getLocale
-
setLocale
-
getResponseMaxChunkSizeBytes
public int getResponseMaxChunkSizeBytes() -
setResponseMaxChunkSizeBytes
public void setResponseMaxChunkSizeBytes(int responseMaxBufferSizeBytes) -
getTemplateEngine
-
setTemplateEngine
-
getStaticVariables
-
addStaticVariable
-
setStaticVariables
-
render
public reactor.core.publisher.Mono<Void> render(Map<String, ?> model, org.springframework.http.MediaType contentType, org.springframework.web.server.ServerWebExchange exchange) - Specified by:
render
in interfaceorg.springframework.web.reactive.result.view.View
- Overrides:
render
in classorg.springframework.web.reactive.result.view.AbstractView
-
renderInternal
protected reactor.core.publisher.Mono<Void> renderInternal(Map<String, Object> renderAttributes, org.springframework.http.MediaType contentType, org.springframework.web.server.ServerWebExchange exchange) - Specified by:
renderInternal
in classorg.springframework.web.reactive.result.view.AbstractView
-
renderFragmentInternal
-