diff --git a/pigx-common/pigx-common-websocket/src/main/java/com/pig4cloud/pigx/common/websocket/config/LocalMessageDistributorConfig.java b/pigx-common/pigx-common-websocket/src/main/java/com/pig4cloud/pigx/common/websocket/config/LocalMessageDistributorConfig.java index b0ce1d614..f76952ef8 100644 --- a/pigx-common/pigx-common-websocket/src/main/java/com/pig4cloud/pigx/common/websocket/config/LocalMessageDistributorConfig.java +++ b/pigx-common/pigx-common-websocket/src/main/java/com/pig4cloud/pigx/common/websocket/config/LocalMessageDistributorConfig.java @@ -15,7 +15,7 @@ import org.springframework.context.annotation.Configuration; * @author hccake */ @ConditionalOnProperty(prefix = WebSocketProperties.PREFIX, name = "message-distributor", - havingValue = MessageDistributorTypeConstants.LOCAL, matchIfMissing = true) + havingValue = MessageDistributorTypeConstants.LOCAL) @Configuration(proxyBeanMethods = false) @RequiredArgsConstructor public class LocalMessageDistributorConfig { diff --git a/pigx-common/pigx-common-websocket/src/main/java/com/pig4cloud/pigx/common/websocket/config/RedisMessageDistributorConfig.java b/pigx-common/pigx-common-websocket/src/main/java/com/pig4cloud/pigx/common/websocket/config/RedisMessageDistributorConfig.java index 8cfca903d..a6263dd4f 100644 --- a/pigx-common/pigx-common-websocket/src/main/java/com/pig4cloud/pigx/common/websocket/config/RedisMessageDistributorConfig.java +++ b/pigx-common/pigx-common-websocket/src/main/java/com/pig4cloud/pigx/common/websocket/config/RedisMessageDistributorConfig.java @@ -22,7 +22,7 @@ import org.springframework.data.redis.listener.RedisMessageListenerContainer; */ @ConditionalOnClass(StringRedisTemplate.class) @ConditionalOnProperty(prefix = WebSocketProperties.PREFIX, name = "message-distributor", - havingValue = MessageDistributorTypeConstants.REDIS) + havingValue = MessageDistributorTypeConstants.REDIS, matchIfMissing = true) @Configuration(proxyBeanMethods = false) @RequiredArgsConstructor public class RedisMessageDistributorConfig { diff --git a/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/service/impl/SysFileServiceImpl.java b/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/service/impl/SysFileServiceImpl.java index db8407cb2..cd1af9ea8 100644 --- a/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/service/impl/SysFileServiceImpl.java +++ b/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/service/impl/SysFileServiceImpl.java @@ -69,11 +69,11 @@ public class SysFileServiceImpl extends ServiceImpl impl resultMap.put("url", String.format("/admin/sys-file/%s/%s", ossProperties.getBucketName(), fileName)); try (InputStream inputStream = file.getInputStream()) { - minioTemplate.putObject(ossProperties.getBucketName(), fileName, inputStream, - file.getContentType()); + minioTemplate.putObject(ossProperties.getBucketName(), fileName, inputStream, file.getContentType()); // 文件管理数据记录,收集管理追踪文件 fileLog(file, fileName); - } catch (Exception e) { + } + catch (Exception e) { log.error("上传失败", e); return R.failed(e.getLocalizedMessage()); }