本文整理汇总了Java中org.jtwig.spring.JtwigViewResolver类的典型用法代码示例。如果您正苦于以下问题:Java JtwigViewResolver类的具体用法?Java JtwigViewResolver怎么用?Java JtwigViewResolver使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
JtwigViewResolver类属于org.jtwig.spring包,在下文中一共展示了JtwigViewResolver类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: configure
import org.jtwig.spring.JtwigViewResolver; //导入依赖的package包/类
@Override
public void configure(JtwigViewResolver viewResolver) {
viewResolver.setRenderer(new JtwigRenderer(
EnvironmentConfigurationBuilder.configuration()
.extensions()
.add(new HotReloadingExtension())
.add(new SpringAssetExtension())
.and()
.build()
));
}
示例2: viewResolver
import org.jtwig.spring.JtwigViewResolver; //导入依赖的package包/类
@Bean
public ViewResolver viewResolver () {
log.info("WebConfig");
JtwigViewResolver jtwigViewResolver = new JtwigViewResolver();
jtwigViewResolver.setPrefix("classpath:/templates/");
jtwigViewResolver.setSuffix(".twig");
return jtwigViewResolver;
}
示例3: viewResolver
import org.jtwig.spring.JtwigViewResolver; //导入依赖的package包/类
@Bean
public ViewResolver viewResolver () {
log.info("WebConfig");
ThemePrefixResolver prefixResolver = new ThemePrefixResolver(themeResolver());
JtwigViewResolver jtwigViewResolver = new JtwigViewResolver();
jtwigViewResolver.setPrefix("classpath:/templates/");
jtwigViewResolver.setSuffix(".twig");
jtwigViewResolver.setPrefixResolver(prefixResolver);
return jtwigViewResolver;
}
示例4: viewResolver
import org.jtwig.spring.JtwigViewResolver; //导入依赖的package包/类
@Bean
public ViewResolver viewResolver () {
log.info("WebWithCustomRenderConfig");
JtwigViewResolver jtwigViewResolver = new JtwigViewResolver();
jtwigViewResolver.setPrefix("classpath:/templates/");
jtwigViewResolver.setSuffix(".twig");
jtwigViewResolver.setRenderer(new JtwigRenderer(new DefaultEnvironmentConfiguration()));
return jtwigViewResolver;
}
示例5: jtwigViewResolver
import org.jtwig.spring.JtwigViewResolver; //导入依赖的package包/类
@Bean
public JtwigViewResolver jtwigViewResolver() {
JtwigViewResolver viewResolver = new JtwigViewResolver();
properties.applyToViewResolver(viewResolver);
if (configurer != null) {
LOGGER.info("Jtwig View Resolver configurer provided, applying custom configuration");
configurer.configure(viewResolver);
}
LOGGER.info("Jtwig View Resolver bean added to the context");
return viewResolver;
}
示例6: applyToViewResolver
import org.jtwig.spring.JtwigViewResolver; //导入依赖的package包/类
@Override
public void applyToViewResolver(Object viewResolver) {
super.applyToViewResolver(viewResolver);
isInstanceOf(JtwigViewResolver.class, viewResolver,
"ViewResolver is not an instance of JtwigViewResolver :" + viewResolver);
}
示例7: configure
import org.jtwig.spring.JtwigViewResolver; //导入依赖的package包/类
@Override
public void configure(JtwigViewResolver viewResolver) {
viewResolver.setPrefix("classpath:/files/");
}
示例8: configure
import org.jtwig.spring.JtwigViewResolver; //导入依赖的package包/类
@Override
public void configure(JtwigViewResolver viewResolver) {
}
示例9: configure
import org.jtwig.spring.JtwigViewResolver; //导入依赖的package包/类
void configure (JtwigViewResolver viewResolver);