Format example code in 'Publishing (Sending Messages)' section of ref doc.

Closed #2533
This commit is contained in:
1993heqiang
2023-03-22 19:53:19 +08:00
committed by John Blum
parent d55e93bb81
commit 5a39b3564e

View File

@@ -22,7 +22,9 @@ To publish a message, you can use, as with the other operations, either the low-
// send message through connection RedisConnection con = ...
byte[] msg = ...
byte[] channel = ...
con.publish(msg, channel); // send message through RedisTemplate
con.publish(msg, channel);
// send message through RedisTemplate
RedisTemplate template = ...
Long numberOfClients = template.convertAndSend("hello!", "world");
----