Using RedisTemplate set a value but get Nil from Terminal Redis-CLI
<p>1.Set key <code>name</code> with <code>alex</code> using <code>Spring data redis</code> Library.</p>

<pre><code> @Test
public void testOne() throws Exception {
    redisTemplate.opsForValue().set("name","alex");
}
</code></pre>

<p>2.Try get name from Terminal with <code>redis-cli</code> but get Nil</p>

<pre><code>127.0.0.1:6379&gt; get name
(nil)
</code></pre>

<p>3.However <code>alex</code> can be retrieve like this</p>

<pre><code>Object hello = redisTemplate.opsForValue().get("name");
System.out.println(hello);
-----
alex
</code></pre>

<p>Can anyone explain this, thanks!</p>