java.lang.Object
io.jstach.opt.spring.example.WebConfig
- All Implemented Interfaces:
org.springframework.web.servlet.config.annotation.WebMvcConfigurer
@Configuration
public class WebConfig
extends Object
implements org.springframework.web.servlet.config.annotation.WebMvcConfigurer
Configures MVC using
JStachioHttpMessageConverter
to allow returning models
which will be rendered using JStachio runtime.- Author:
- agentgt, dsyer
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
configureMessageConverters
(List<org.springframework.http.converter.HttpMessageConverter<?>> converters) viewSetupHandlerInterceptor
(org.springframework.context.ApplicationContext context) Configures an interceptor for before rendering logic useful for adding additional data to JStache models.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.web.servlet.config.annotation.WebMvcConfigurer
addArgumentResolvers, addCorsMappings, addFormatters, addInterceptors, addResourceHandlers, addReturnValueHandlers, addViewControllers, configureAsyncSupport, configureContentNegotiation, configureDefaultServletHandling, configureHandlerExceptionResolvers, configurePathMatch, configureViewResolvers, extendHandlerExceptionResolvers, extendMessageConverters, getMessageCodesResolver, getValidator
-
Constructor Details
-
WebConfig
Configures based on the jstachio found by spring- Parameters:
jstachio
- the found jstachio
-
-
Method Details
-
configureMessageConverters
public void configureMessageConverters(List<org.springframework.http.converter.HttpMessageConverter<?>> converters) - Specified by:
configureMessageConverters
in interfaceorg.springframework.web.servlet.config.annotation.WebMvcConfigurer
-
viewSetupHandlerInterceptor
@Bean public ViewSetupHandlerInterceptor viewSetupHandlerInterceptor(org.springframework.context.ApplicationContext context) Configures an interceptor for before rendering logic useful for adding additional data to JStache models.- Parameters:
context
- searched forJStachioModelViewConfigurer
s.- Returns:
- interceptor that will automatically be added to the web context.
-