Class VSpringWebConfig

java.lang.Object
io.vertigo.ui.impl.springmvc.config.VSpringWebConfig
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, org.springframework.web.servlet.config.annotation.WebMvcConfigurer

@Configuration @EnableVertigoSpringBridge @EnableWebMvc public class VSpringWebConfig extends Object implements org.springframework.web.servlet.config.annotation.WebMvcConfigurer, org.springframework.context.ApplicationContextAware
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Param of the dev mode of the templates (true by default), see isDevMode().
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addArgumentResolvers(List<org.springframework.web.method.support.HandlerMethodArgumentResolver> resolvers)
     
    void
    addFormatters(org.springframework.format.FormatterRegistry registry)
     
    void
    addInterceptors(org.springframework.web.servlet.config.annotation.InterceptorRegistry registry)
     
    void
    addResourceHandlers(org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry registry)
     
    void
    addReturnValueHandlers(List<org.springframework.web.method.support.HandlerMethodReturnValueHandler> handlers)
     
    void
    configureViewResolvers(org.springframework.web.servlet.config.annotation.ViewResolverRegistry registry)
    STEP 3 - Register ThymeleafViewResolver
    org.springframework.web.servlet.RequestToViewNameTranslator
     
    protected Set<String>
    Prefixes of the custom elements closed when self-closed (q-btn ... / becomes an open/close pair) : the browser ignores the trailing slash of a custom element, which would swallow everything that follows.
    protected Set<String>
    Deprecated.
    protected String
    Deprecated.
     
    protected boolean
    Dev mode of the templates : read again at each request (no cache), vu: elements without component logged.
    org.springframework.web.servlet.LocaleResolver
     
    org.springframework.web.multipart.support.StandardServletMultipartResolver
     
    void
    setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
     
    org.thymeleaf.spring6.SpringTemplateEngine
     
    org.thymeleaf.spring6.templateresolver.SpringResourceTemplateResolver
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.springframework.web.servlet.config.annotation.WebMvcConfigurer

    addCorsMappings, addErrorResponseInterceptors, addViewControllers, configureAsyncSupport, configureContentNegotiation, configureDefaultServletHandling, configureHandlerExceptionResolvers, configureMessageConverters, configurePathMatch, extendHandlerExceptionResolvers, extendMessageConverters, getMessageCodesResolver, getValidator
  • Field Details

    • THYMELEAF_DEV_MODE_PARAM_NAME

      public static final String THYMELEAF_DEV_MODE_PARAM_NAME
      Param of the dev mode of the templates (true by default), see isDevMode().
      See Also:
  • Constructor Details

    • VSpringWebConfig

      public VSpringWebConfig()
  • Method Details

    • templateResolver

      @Bean public org.thymeleaf.spring6.templateresolver.SpringResourceTemplateResolver templateResolver()
    • templateEngine

      @Bean public org.thymeleaf.spring6.SpringTemplateEngine templateEngine()
    • getCustomComponentNames

      @Deprecated protected Set<String> getCustomComponentNames()
      Deprecated.
      Deprecated, UI components can be defined through VSpringMvcConfigDefinition. For simplicity of declaration, use a module feature extending DefaultUiModuleFeatures and put your components in the "components" directory of your module.
    • getCustomComponentsPathPrefix

      @Deprecated protected String getCustomComponentsPathPrefix()
      Deprecated.
      Deprecated, UI components can be defined through VSpringMvcConfigDefinition. For simplicity of declaration, use a module feature extending DefaultUiModuleFeatures and put your components in the "components" directory of your module. Define prefix for custom components. Should be the module name : don't starts with /, ends with / Components must be put in : prefix+"/components/"+componentName
      Returns:
      path prefix for custom components
    • getAutoCloseTagsPrefixes

      protected Set<String> getAutoCloseTagsPrefixes()
      Prefixes of the custom elements closed when self-closed (q-btn ... / becomes an open/close pair) : the browser ignores the trailing slash of a custom element, which would swallow everything that follows. Override to add the prefixes of your own components.
      Returns:
      prefixes of the elements to close (q-, v-, vui-, dsfr- by default)
    • customRequestToViewNameTranslator

      @Bean("viewNameTranslator") public org.springframework.web.servlet.RequestToViewNameTranslator customRequestToViewNameTranslator()
    • multipartResolver

      @Bean public org.springframework.web.multipart.support.StandardServletMultipartResolver multipartResolver()
    • configureViewResolvers

      public void configureViewResolvers(org.springframework.web.servlet.config.annotation.ViewResolverRegistry registry)
      STEP 3 - Register ThymeleafViewResolver
      Specified by:
      configureViewResolvers in interface org.springframework.web.servlet.config.annotation.WebMvcConfigurer
    • addFormatters

      public void addFormatters(org.springframework.format.FormatterRegistry registry)
      Specified by:
      addFormatters in interface org.springframework.web.servlet.config.annotation.WebMvcConfigurer
    • addArgumentResolvers

      public void addArgumentResolvers(List<org.springframework.web.method.support.HandlerMethodArgumentResolver> resolvers)
      Specified by:
      addArgumentResolvers in interface org.springframework.web.servlet.config.annotation.WebMvcConfigurer
    • addReturnValueHandlers

      public void addReturnValueHandlers(List<org.springframework.web.method.support.HandlerMethodReturnValueHandler> handlers)
      Specified by:
      addReturnValueHandlers in interface org.springframework.web.servlet.config.annotation.WebMvcConfigurer
    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException
    • addInterceptors

      public void addInterceptors(org.springframework.web.servlet.config.annotation.InterceptorRegistry registry)
      Specified by:
      addInterceptors in interface org.springframework.web.servlet.config.annotation.WebMvcConfigurer
    • getVControllerInterceptorEngines

      protected List<Class<? extends VControllerInterceptorEngine>> getVControllerInterceptorEngines()
    • addResourceHandlers

      public void addResourceHandlers(org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry registry)
      Specified by:
      addResourceHandlers in interface org.springframework.web.servlet.config.annotation.WebMvcConfigurer
    • localeResolver

      @Bean public org.springframework.web.servlet.LocaleResolver localeResolver()
    • isDevMode

      protected boolean isDevMode()
      Dev mode of the templates : read again at each request (no cache), vu: elements without component logged. Param THYMELEAF_DEV_MODE, true by default (comfort of the development) : set it to false in production. A project may override this method.