Java Code Examples for org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver#setPrefix()

The following examples show how to use org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver#setPrefix() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FreeMarkerViewConfiguration.java    From apm-agent-java with Apache License 2.0 5 votes vote down vote up
@Bean
public FreeMarkerViewResolver freemarkerViewResolver() {
    FreeMarkerViewResolver resolver = new FreeMarkerViewResolver();
    resolver.setCache(true);
    resolver.setPrefix("");
    resolver.setSuffix(".ftl");
    return resolver;
}
 
Example 2
Source File: GlobalConfig.java    From pacbot with Apache License 2.0 5 votes vote down vote up
@Bean
public ViewResolver viewResolver() {
    FreeMarkerViewResolver resolver = new FreeMarkerViewResolver();
    resolver.setCache(true);
    resolver.setPrefix("");
    resolver.setSuffix(".html");
    resolver.setContentType("text/html; charset=UTF-8");
    return resolver;
}
 
Example 3
Source File: SpringContextConfig.java    From Spring-5.0-Cookbook with MIT License 5 votes vote down vote up
@Bean(name = "viewResolverFTL")
public FreeMarkerViewResolver getViewResolverFtl() {
    FreeMarkerViewResolver viewResolver = new FreeMarkerViewResolver();
    viewResolver.setPrefix("");
    viewResolver.setSuffix(".ftl");
    viewResolver.setOrder(1);
    return viewResolver;
}
 
Example 4
Source File: SpringWebReactiveConfig.java    From Spring-5.0-Cookbook with MIT License 5 votes vote down vote up
@Bean(name = "viewResolverFTL")
public FreeMarkerViewResolver getViewResolverFtl() {
    FreeMarkerViewResolver viewResolver = new FreeMarkerViewResolver();
    viewResolver.setPrefix("");
    viewResolver.setSuffix(".ftl");
    viewResolver.setOrder(1);
    return viewResolver;
}
 
Example 5
Source File: SpringContextConfig.java    From Spring-5.0-Cookbook with MIT License 5 votes vote down vote up
@Bean(name = "viewResolverFTL")
public FreeMarkerViewResolver getViewResolverFtl() {
    FreeMarkerViewResolver viewResolver = new FreeMarkerViewResolver();
    viewResolver.setPrefix("");
    viewResolver.setSuffix(".ftl");
    viewResolver.setOrder(1);
    return viewResolver;
}
 
Example 6
Source File: EmailConfiguration.java    From tutorials with MIT License 5 votes vote down vote up
@Bean 
public FreeMarkerViewResolver freemarkerViewResolver() { 
    FreeMarkerViewResolver resolver = new FreeMarkerViewResolver(); 
    resolver.setCache(true); 
    resolver.setPrefix(""); 
    resolver.setSuffix(".ftl"); 
    return resolver; 
}
 
Example 7
Source File: FreemarkerConfiguration.java    From tutorials with MIT License 5 votes vote down vote up
@Bean 
public FreeMarkerViewResolver freemarkerViewResolver() { 
    FreeMarkerViewResolver resolver = new FreeMarkerViewResolver(); 
    resolver.setCache(true); 
    resolver.setPrefix(""); 
    resolver.setSuffix(".ftl"); 
    return resolver; 
}
 
Example 8
Source File: SpringWebConfig.java    From tutorials with MIT License 5 votes vote down vote up
@Bean
public FreeMarkerViewResolver freemarkerViewResolver() {
    FreeMarkerViewResolver resolver = new FreeMarkerViewResolver();
    resolver.setCache(true);
    resolver.setPrefix("");
    resolver.setSuffix(".ftl");
    return resolver;
}