请求日志打印
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
package cn.ysk.cashier.config;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.data.redis.connection.Message;
|
||||
import org.springframework.data.redis.connection.MessageListener;
|
||||
|
||||
@Configuration
|
||||
public class RedisKeyExpirationListener implements MessageListener {
|
||||
|
||||
@Override
|
||||
public void onMessage(Message message, byte[] pattern) {
|
||||
String expiredKey = new String(message.getBody());
|
||||
System.out.println("过期的Key为: " + expiredKey);
|
||||
// 在这里添加处理键过期事件的逻辑
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user