Class ThymeleafReactiveView

    • Field Detail

      • logger

        protected static final org.slf4j.Logger logger
      • DEFAULT_RESPONSE_CHUNK_SIZE_BYTES

        public static final int DEFAULT_RESPONSE_CHUNK_SIZE_BYTES
        By default, no max response chunk size is set. Value = Integer.MAX_VALUE
        See Also:
        Constant Field Values
      • REACTIVE_MODEL_ADDITIONS_EXECUTION_ATTRIBUTE_PREFIX

        public static final String REACTIVE_MODEL_ADDITIONS_EXECUTION_ATTRIBUTE_PREFIX

        This prefix should be used in order to allow dialects to provide reactive stream objects that should be resolved (in an unblocked manner) just before the execution of the view. The idea is to allow these streams to be included in the standard reactive Spring view model resolution mechanisms so that Thymeleaf does not have to block during the execution of the view in order to obtain the value. The result will be as if reactive stream objects had been added by the controller methods.

        The name of the attributes being added to the Model will be the name of the execution attribute minus the prefix. So ThymeleafReactiveModelAdditions:somedata will result in a Model attribute called somedata.

        Values of these execution attributes are allowed to be:

        • Publisher<?> (including Flux<?> and Mono<?>).
        • Supplier<? extends Publisher<?>>: The supplier will be called at View rendering time and the result will be added to the Model.
        • Function<ServerWebExchange,? extends Publisher<?>>: The function will be called at View rendering time and the result will be added to the Model.

        Value: "ThymeleafReactiveModelAdditions:"

        Since:
        3.0.10
        See Also:
        Constant Field Values
    • Constructor Detail

      • ThymeleafReactiveView

        public ThymeleafReactiveView()
    • Method Detail

      • getMarkupSelector

        public String getMarkupSelector()
      • setMarkupSelector

        public void setMarkupSelector​(String markupSelector)
      • setDefaultCharset

        public void setDefaultCharset​(Charset defaultCharset)
        Overrides:
        setDefaultCharset in class org.springframework.web.reactive.result.view.AbstractView
      • setSupportedMediaTypes

        public void setSupportedMediaTypes​(List<org.springframework.http.MediaType> supportedMediaTypes)
        Overrides:
        setSupportedMediaTypes in class org.springframework.web.reactive.result.view.AbstractView
      • getBeanName

        public String getBeanName()
      • setBeanName

        public void setBeanName​(String beanName)
        Specified by:
        setBeanName in interface org.springframework.beans.factory.BeanNameAware
      • getTemplateName

        public String getTemplateName()
      • setTemplateName

        public void setTemplateName​(String templateName)
      • getLocale

        protected Locale getLocale()
      • setLocale

        protected void setLocale​(Locale locale)
      • getResponseMaxChunkSizeBytes

        public int getResponseMaxChunkSizeBytes()
      • setResponseMaxChunkSizeBytes

        public void setResponseMaxChunkSizeBytes​(int responseMaxBufferSizeBytes)
      • addStaticVariable

        public void addStaticVariable​(String name,
                                      Object value)
      • setStaticVariables

        public void setStaticVariables​(Map<String,​?> variables)
      • 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 interface org.springframework.web.reactive.result.view.View
        Overrides:
        render in class org.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 class org.springframework.web.reactive.result.view.AbstractView
      • renderFragmentInternal

        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)