Answers for "redistemplate set and get"

0

redistemplate set and get

@Autowired private RedisTemplate< String, Object > template;

public Object getValue( final String key ) {
    return template.opsForValue().get( key );
}

public void setValue( final String key, final String value ) {
    template.opsForValue().set( key, value );
}
Posted by: Guest on April-13-2022

Browse Popular Code Answers by Language