Redis transaction management

when you use spring-data-redis to integrate redis, in a spring project and operate on redis through RedisTemplate, you want to package some operations of multiple redistemplate so that other Redis operations may not be inserted.

public class Test {

@Resource
RedisTemplate<String, A> classARedisTemplate;

@Resource
RedisTemplate<String, B> classBRedisTemplate;;

//,Redisredis
public void transaction(){
    A a = new A();
    
    classARedisTemplate.opsForValue().set("keyA", a);
    //Do something
    B b = new B();
    classBRedisTemplate.opsForValue().set("keyB", b);
}

}

I would like to ask the gods how to achieve the above needs. Thank you!

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1be6666-30f79.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1be6666-30f79.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?