♻️ Refactoring code. common-websocket 默认使用 RedisMessageDistributorConfig.java
This commit is contained in:
1 parent
bfe8cc2336
commit
7a69bff0e0
3 files changed
+5
-5
No files matched your search
+1
-1
@@ -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 {
|
||||
|
||||
+1
-1
@@ -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 {
|
||||
|
||||
+3
-3
@@ -69,11 +69,11 @@ public class SysFileServiceImpl extends ServiceImpl<SysFileMapper, SysFile> 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());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user