Merge branch 'master' into docker_package
This commit is contained in:
commit
4fde0bc273
|
@ -25,6 +25,23 @@ public class CodeGenerationUtils {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* 使用单例枚举保证全局单例
|
||||
*/
|
||||
enum CodeGenerationUtilsEnum {
|
||||
INSTANCE;
|
||||
private CodeGenerationUtils codeGenerationUtils;
|
||||
|
||||
CodeGenerationUtilsEnum() {
|
||||
codeGenerationUtils = new CodeGenerationUtils();
|
||||
}
|
||||
|
||||
public CodeGenerationUtils getInstnce() {
|
||||
return codeGenerationUtils;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 生成流程单号
|
||||
* <p>
|
||||
|
@ -89,9 +106,7 @@ public class CodeGenerationUtils {
|
|||
|
||||
}
|
||||
|
||||
private static CodeGenerationUtils codeGenerationUtils = new CodeGenerationUtils();
|
||||
|
||||
public static CodeGenerationUtils getInstance() {
|
||||
return codeGenerationUtils;
|
||||
return CodeGenerationUtilsEnum.INSTANCE.getInstnce();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue