001/*
002 * Copyright 2012-2017 the original author or authors.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *      http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016
017package org.springframework.boot.autoconfigure.mustache;
018
019import org.springframework.boot.autoconfigure.template.AbstractTemplateViewResolverProperties;
020import org.springframework.boot.context.properties.ConfigurationProperties;
021
022/**
023 * {@link ConfigurationProperties} for Mustache.
024 *
025 * @author Dave Syer
026 * @since 1.2.2
027 */
028@ConfigurationProperties(prefix = "spring.mustache")
029public class MustacheProperties extends AbstractTemplateViewResolverProperties {
030
031        public static final String DEFAULT_PREFIX = "classpath:/templates/";
032
033        public static final String DEFAULT_SUFFIX = ".mustache";
034
035        /**
036         * Prefix to apply to template names.
037         */
038        private String prefix = DEFAULT_PREFIX;
039
040        /**
041         * Suffix to apply to template names.
042         */
043        private String suffix = DEFAULT_SUFFIX;
044
045        public MustacheProperties() {
046                super(DEFAULT_PREFIX, DEFAULT_SUFFIX);
047        }
048
049        @Override
050        public String getPrefix() {
051                return this.prefix;
052        }
053
054        @Override
055        public void setPrefix(String prefix) {
056                this.prefix = prefix;
057        }
058
059        @Override
060        public String getSuffix() {
061                return this.suffix;
062        }
063
064        @Override
065        public void setSuffix(String suffix) {
066                this.suffix = suffix;
067        }
068
069}