docs 新增工具类注释

This commit is contained in:
AprilWind
2024-07-02 14:49:06 +08:00
parent 94cb942305
commit 0548faa837
3 changed files with 72 additions and 2 deletions

View File

@@ -65,6 +65,12 @@ public class RedisUtils {
consumer.accept(msg);
}
/**
* 发布消息到指定的频道
*
* @param channelKey 通道key
* @param msg 发送数据
*/
public static <T> void publish(String channelKey, T msg) {
RTopic topic = CLIENT.getTopic(channelKey);
topic.publish(msg);