diff --git a/basic-properties/src/main/java/ink/wgink/properties/form/FormProperties.java b/basic-properties/src/main/java/ink/wgink/properties/form/FormProperties.java new file mode 100644 index 00000000..b6a5d27d --- /dev/null +++ b/basic-properties/src/main/java/ink/wgink/properties/form/FormProperties.java @@ -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; + } +}