当前位置: 首页>>代码示例>>Java>>正文


Java JtwigViewResolver类代码示例

本文整理汇总了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()
	));
}
 
开发者ID:gin-fizz,项目名称:pollistics,代码行数:12,代码来源:WebConfig.java

示例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;
}
 
开发者ID:jtwig,项目名称:jtwig-spring,代码行数:9,代码来源:WebConfig.java

示例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;
}
 
开发者ID:jtwig,项目名称:jtwig-spring,代码行数:11,代码来源:WebWithPrefixConfig.java

示例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;
}
 
开发者ID:jtwig,项目名称:jtwig-spring,代码行数:10,代码来源:WebWithCustomRenderConfig.java

示例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;
}
 
开发者ID:jtwig,项目名称:jtwig-spring-boot-starter,代码行数:15,代码来源:JtwigAutoConfiguration.java

示例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);
}
 
开发者ID:jtwig,项目名称:jtwig-spring-boot-starter,代码行数:7,代码来源:JtwigProperties.java

示例7: configure

import org.jtwig.spring.JtwigViewResolver; //导入依赖的package包/类
@Override
public void configure(JtwigViewResolver viewResolver) {
    viewResolver.setPrefix("classpath:/files/");
}
 
开发者ID:jtwig,项目名称:jtwig-spring-boot-starter,代码行数:5,代码来源:CustomPrefixConfigTest.java

示例8: configure

import org.jtwig.spring.JtwigViewResolver; //导入依赖的package包/类
@Override
public void configure(JtwigViewResolver viewResolver) {

}
 
开发者ID:jtwig,项目名称:jtwig-spring-boot-starter,代码行数:5,代码来源:CustomConfigTest.java

示例9: configure

import org.jtwig.spring.JtwigViewResolver; //导入依赖的package包/类
void configure (JtwigViewResolver viewResolver); 
开发者ID:jtwig,项目名称:jtwig-spring-boot-starter,代码行数:2,代码来源:JtwigViewResolverConfigurer.java


注:本文中的org.jtwig.spring.JtwigViewResolver类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。