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 6dd71c4c89
commit aedaf651b5

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 = ...
template.convertAndSend("hello!", "world");
----