新增表单配置
This commit is contained in:
parent
83803fa2a3
commit
a00eab5a26
@ -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;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user