feat(amazon): 实现商标筛查功能并优化用户体验
- 添加商标筛查面板和相关API接口- 实现Excel文件解析和数据过滤功能 - 添加文件上传进度跟踪和错误处理-优化空状态显示和操作引导- 实现tab状态持久化存储 - 添加订阅会员弹窗和付费入口 -优化文件选择和删除功能 - 改进UI样式和响应式布局
This commit is contained in:
@@ -1,52 +0,0 @@
|
||||
package com.ruoyi.common.core.redis;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.redis.connection.RedisConnectionFactory;
|
||||
import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* Redis连接健康检查组件
|
||||
* 定期检测Redis连接状态,确保连接可用
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class RedisHealthCheck {
|
||||
|
||||
@Autowired
|
||||
private RedisConnectionFactory redisConnectionFactory;
|
||||
|
||||
/**
|
||||
* 每5分钟检查一次Redis连接状态
|
||||
*/
|
||||
@Scheduled(fixedRate = 300000)
|
||||
public void checkRedisConnection() {
|
||||
try {
|
||||
if (redisConnectionFactory instanceof LettuceConnectionFactory) {
|
||||
LettuceConnectionFactory lettuceFactory = (LettuceConnectionFactory) redisConnectionFactory;
|
||||
|
||||
// 验证连接是否有效
|
||||
if (!lettuceFactory.getConnection().ping().equals("PONG")) {
|
||||
log.warn("Redis连接异常,尝试重新连接...");
|
||||
lettuceFactory.resetConnection();
|
||||
log.info("Redis连接已重置");
|
||||
} else {
|
||||
log.debug("Redis连接正常");
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("Redis连接检查失败: {}", e.getMessage());
|
||||
try {
|
||||
// 尝试重置连接
|
||||
((LettuceConnectionFactory) redisConnectionFactory).resetConnection();
|
||||
log.info("Redis连接已重置");
|
||||
} catch (Exception ex) {
|
||||
log.error("Redis连接重置失败: {}", ex.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user