public static void main(String[] args) {
ApplicationContext context = new ClassPathXmlApplicationContext("config.xml", RedisHashDemo.class);
// clear out old test data first
RedisConnectionFactory connectionFactory = context.getBean(RedisConnectionFactory.class);
RedisTemplate<String, String> redisTemplate = new RedisTemplate<String, String>(connectionFactory);
Set<String> keys = redisTemplate.keys(RedisHashPersonRepository.REDIS_KEY_PATTERN);
if (keys != null && keys.size() > 0) {
redisTemplate.delete(keys);
}