新增表单配置

This commit is contained in:
wanggeng 2022-03-10 22:30:21 +08:00
parent 83803fa2a3
commit a00eab5a26

View File

@ -0,0 +1,33 @@
package ink.wgink.properties.form;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;
import java.io.File;
/**
* @ClassName: FormProperties
* @Description: 表单属性
* @Author: wanggeng
* @Date: 2022/3/10 4:17 PM
* @Version: 1.0
*/
@Component
@ConfigurationProperties(prefix = "form")
public class FormProperties {
private String templatePath;
public String getTemplatePath() {
templatePath = templatePath == null ? "" : templatePath.trim();
if (!StringUtils.isEmpty(templatePath) && !templatePath.endsWith(File.separator)) {
templatePath += File.separator;
}
return templatePath;
}
public void setTemplatePath(String templatePath) {
this.templatePath = templatePath;
}
}