com.gitee.beiding.template_excel.Config Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of template-excel Show documentation
Show all versions of template-excel Show documentation
使用模板快速提取excel文件中的数据为数据实体,或者使用模板将数据实体渲染成excel
package com.gitee.beiding.template_excel;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
/**
* 使用该类添加全局配置,例如日期格式化等
*/
public class Config {
private static DateFormat dataFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
public static void setDataFormat(String format) {
dataFormat = new SimpleDateFormat(format);
}
public static DateFormat getDataFormat() {
return dataFormat;
}
//js工作器数量
private static int coreJsWorkerNumber = 5;
public static void setCoreJsWorkerNumber(int coreJsWorkerNumber) {
Config.coreJsWorkerNumber = coreJsWorkerNumber;
}
public static int getCoreJsWorkerNumber() {
return coreJsWorkerNumber;
}
}