Class SpringContextUtils

Object
org.thymeleaf.spring5.context.SpringContextUtils

public class SpringContextUtils extends Object

Utility class for easy access of information stored at the context in a Spring-enabled application (such as the Spring ApplicationContext).

Since:
3.0.3
Author:
Daniel Fernández
  • Field Details

    • WEB_SESSION_ATTRIBUTE_NAME

      public static final String WEB_SESSION_ATTRIBUTE_NAME

      This is the name of the model attribute that will hold the (asychronously resolved) WebSession object in order to be used whenever needed, avoiding the need to block for obtaining it from the ServerWebExchange.

      Note resolving the WebSession from the reactive Mono<WebSession> stream does mean the creation of a WebSession instance, but not the real creation of a persisted session sent to the browser.

      Value: "thymeleafWebSession"

      See Also:
    • WEB_EXCHANGE_PRINCIPAL_ATTRIBUTE_NAME

      public static final String WEB_EXCHANGE_PRINCIPAL_ATTRIBUTE_NAME

      This is the name of the model attribute that will hold the (asychronously resolved) Principal object in order to be used whenever needed, avoiding the need to block for obtaining it from the ServerWebExchange.

      Value: "thymeleafWebExchangePrincipal"

      Since:
      3.1.0
      See Also:
  • Method Details