Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
397 views
in Technique[技术] by (71.8m points)

spring boot - use string template with redis repository

how can i use Redis String Template with Redis repository. By default Redis repository (Crud Repository) creates Redis data as Hashes. How can i modify repository to work with String Template.

PS: I am not using any secondary index. so i am not worried if @SecondaryIndex don't work

@Bean
    public RedisTemplate redisTemplate() {
    StringRedisTemplate template = new StringRedisTemplate();
        template.setConnectionFactory(jedisConnectionFactory());
        return template;
    }

Above mentioned code still uses hashes


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...