Java 类org.springframework.boot.autoconfigure.mustache.web.MustacheViewResolver 实例源码

项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:DeviceDelegatingViewResolverAutoConfiguration.java   
@Bean
@ConditionalOnBean(MustacheViewResolver.class)
public LiteDeviceDelegatingViewResolver deviceDelegatingMustacheViewResolver(
        DeviceDelegatingViewResolverFactory factory,
        MustacheViewResolver viewResolver) {
    return factory.createViewResolver(viewResolver);
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:MustacheAutoConfiguration.java   
@Bean
@ConditionalOnMissingBean(MustacheViewResolver.class)
public MustacheViewResolver mustacheViewResolver(Compiler mustacheCompiler) {
    MustacheViewResolver resolver = new MustacheViewResolver();
    this.mustache.applyToViewResolver(resolver);
    resolver.setCharset(this.mustache.getCharsetName());
    resolver.setCompiler(mustacheCompiler);
    resolver.setOrder(Ordered.LOWEST_PRECEDENCE - 10);
    return resolver;
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:DeviceDelegatingViewResolverAutoConfigurationTests.java   
@Test
public void deviceDelegatingMustacheViewResolver() throws Exception {
    load(Collections.<Class<?>>singletonList(MustacheAutoConfiguration.class),
            "spring.mobile.devicedelegatingviewresolver.enabled:true");
    assertThat(this.context.getBeansOfType(LiteDeviceDelegatingViewResolver.class))
            .hasSize(2);
    assertLiteDeviceDelegatingViewResolver(
            this.context.getBean(MustacheViewResolver.class),
            "deviceDelegatingMustacheViewResolver");
}
项目:spring-boot-concourse    文件:MustacheAutoConfiguration.java   
@Bean
@ConditionalOnMissingBean(MustacheViewResolver.class)
public MustacheViewResolver mustacheViewResolver(Compiler mustacheCompiler) {
    MustacheViewResolver resolver = new MustacheViewResolver();
    this.mustache.applyToViewResolver(resolver);
    resolver.setCharset(this.mustache.getCharsetName());
    resolver.setCompiler(mustacheCompiler);
    resolver.setOrder(Ordered.LOWEST_PRECEDENCE - 10);
    return resolver;
}
项目:contestparser    文件:MustacheAutoConfiguration.java   
@Bean
@ConditionalOnMissingBean(MustacheViewResolver.class)
public MustacheViewResolver mustacheViewResolver(Compiler mustacheCompiler) {
    MustacheViewResolver resolver = new MustacheViewResolver();
    resolver.setPrefix(this.mustache.getPrefix());
    resolver.setSuffix(this.mustache.getSuffix());
    resolver.setCache(this.mustache.isCache());
    resolver.setViewNames(this.mustache.getViewNames());
    resolver.setContentType(this.mustache.getContentType().toString());
    resolver.setCharset(this.mustache.getCharsetName());
    resolver.setCompiler(mustacheCompiler);
    resolver.setOrder(Ordered.LOWEST_PRECEDENCE - 10);
    return resolver;
}
项目:citizenship-appointment-server    文件:WebMvcConfig.java   
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
    registry.viewResolver(new MustacheViewResolver());
}