Merge branch 'master' into docker_package

This commit is contained in:
wangliwen 2022-07-14 09:37:45 +08:00
commit 4fde0bc273
1 changed files with 18 additions and 3 deletions

View File

@ -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();
}
}