Fix incorrect doc on injection of opsForXXX

This commit is contained in:
Jennifer Hickey
2013-07-25 09:44:11 -07:00
parent dd8bc2eaaa
commit 800b8700f0
3 changed files with 6 additions and 5 deletions

View File

@@ -29,7 +29,7 @@
requires raw-data (array of bytes), the <classname>RedisTemplate</classname> allow arbitrary objects to be passed
in as messages:</para>
<programlisting lang="java"><![CDATA[// send message through connection
<programlisting language="java">// send message through connection
RedisConnection con = ...
byte[] msg = ...
byte[] channel = ...
@@ -38,7 +38,8 @@ con.publish(msg, channel);
// send message through RedisTemplate
RedisTemplate template = ...
template.convertAndSend("hello!", "world");]]></programlisting>
template.convertAndSend("hello!", "world");
</programlisting>
</section>
<section id="redis:pubsub:subscribe">

View File

@@ -10,7 +10,7 @@
as when using Redis transactions. For example:
</para>
<programlisting lang="java"><![CDATA[ //execute a transaction
<programlisting language="java"><![CDATA[ //execute a transaction
redisTemplate.execute(new SessionCallback<Object>() {
public Object execute(RedisOperations operations) throws DataAccessException {
operations.multi();

View File

@@ -329,11 +329,11 @@
<programlisting language="java"><![CDATA[public class Example {
// inject the actual template
@Resource(name="redisTemplate")
@Autowired
private RedisTemplate<String, String> template;
// inject the template as ListOperations
@Autowired
@Resource(name="redisTemplate")
private ListOperations<String, String> listOps;
public void addLink(String userId, URL url) {