class RedisController {

    private final StringRedisTemplate stringRedisTemplate;

    @Resource(name = "stringRedisTemplate")
    private ValueOperations<String, String> valueOperations;

    private final RedisOptService redisOptService;
    private final RedisLockService redisLockService;

    @RequestMapping("/redis/set")
    public String set(@RequestParam("name") String name, @RequestParam("value") String value) {
        valueOperations.set(name, value);
        return valueOperations.get(name);
    }

    @RequestMapping("/redis/setObject")
    public String setObject(@RequestParam("name") String name) {<FILL_FUNCTION_BODY>}

    @GetMapping("/redis/lock")
    public String lock(@RequestParam("key") String key) {
        for (int i = 0; i < 10; i++) {
            new Thread(() -> {
                redisLockService.lock(key);
                try {
                    Thread.sleep(3000L);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                System.out.println(DateFormatUtils.format(new Date(), "yyyy-MM-dd HH:mm:ss"));
                redisLockService.unlock(key);
            }
            ).start();
        }
        return "OK";
    }

    @GetMapping("/redis/sentinel/set")
    public String sentinelSet(@RequestParam("name") String name) {
        redisOptService.set("name", name, 60000);
        return redisOptService.getStringValue("name");
    }

}

        User user = new User();
        user.setId(RandomUtils.nextInt());
        user.setName(name);
        user.setBirthday(new Date());

        List<String> list = new ArrayList<>();
        list.add("sing");
        list.add("run");
        user.setInteresting(list);

        Map<String, Object> map = new HashMap<>();
        map.put("hasHouse", "yes");
        map.put("hasCar", "no");
        map.put("hasKid", "no");
        user.setOthers(map);

        redisOptService.set(name, user, 30000);
        User userValue = (User) redisOptService.get(name);
        return userValue.toString();
    
<no_super_class>