Skip to content

Commit

Permalink
fix 修复 OssFactory 并发多创建实例问题
Browse files Browse the repository at this point in the history
  • Loading branch information
JavaLionLi committed Nov 24, 2023
1 parent f2598e7 commit a7daed3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public static OssClient instance() {
/**
* 根据类型获取实例
*/
public static OssClient instance(String configKey) {
public static synchronized OssClient instance(String configKey) {
String json = CacheUtils.get(CacheNames.SYS_OSS_CONFIG, configKey);
if (json == null) {
throw new OssException("系统异常, '" + configKey + "'配置信息不存在!");
Expand Down

0 comments on commit a7daed3

Please sign in to comment.