错误信息:
Exception in thread “main” java.lang.IllegalArgumentException: template not initialized; call afterPropertiesSet() before using it
at org.springframework.util.Assert.isTrue(Assert.java:92)
at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:183)
at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:169)
at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:91)
at org.springframework.data.redis.core.DefaultListOperations.rightPush(DefaultListOperations.java:184)
at com.zbz.redis.client.RedisTemplateClient.main(RedisTemplateClient.java:41)