|
|
@ -1,5 +1,5 @@
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* Copyright 2012-2019 the original author or authors.
|
|
|
|
* Copyright 2012-2022 the original author or authors.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
@ -19,6 +19,7 @@ package org.springframework.boot.autoconfigure.mustache;
|
|
|
|
import com.samskivert.mustache.Mustache.Compiler;
|
|
|
|
import com.samskivert.mustache.Mustache.Compiler;
|
|
|
|
|
|
|
|
|
|
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
|
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
|
|
|
|
|
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
|
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
|
|
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
|
|
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type;
|
|
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type;
|
|
|
|
import org.springframework.boot.web.reactive.result.view.MustacheViewResolver;
|
|
|
|
import org.springframework.boot.web.reactive.result.view.MustacheViewResolver;
|
|
|
@ -32,6 +33,7 @@ class MustacheReactiveWebConfiguration {
|
|
|
|
|
|
|
|
|
|
|
|
@Bean
|
|
|
|
@Bean
|
|
|
|
@ConditionalOnMissingBean
|
|
|
|
@ConditionalOnMissingBean
|
|
|
|
|
|
|
|
@ConditionalOnProperty(prefix = "spring.mustache", name = "enabled", matchIfMissing = true)
|
|
|
|
MustacheViewResolver mustacheViewResolver(Compiler mustacheCompiler, MustacheProperties mustache) {
|
|
|
|
MustacheViewResolver mustacheViewResolver(Compiler mustacheCompiler, MustacheProperties mustache) {
|
|
|
|
MustacheViewResolver resolver = new MustacheViewResolver(mustacheCompiler);
|
|
|
|
MustacheViewResolver resolver = new MustacheViewResolver(mustacheCompiler);
|
|
|
|
resolver.setPrefix(mustache.getPrefix());
|
|
|
|
resolver.setPrefix(mustache.getPrefix());
|
|
|
|