RedisTemplate类execute()方法

文档地址 https://docs.spring.io/spring-data/redis/docs/current/api/org/springframework/data/redis/core/RedisTemplate.html#execute(org.springframework.data.redis.core.script.RedisScript,java.util.List,java.lang.Object...)

execute

public T execute(RedisScript script, List keys, Object... args)

Description copied from interface: RedisOperations

执行给定的Redis脚本
Executes the given RedisScript

Specified by:
execute in interface RedisOperations<K,V>

Parameters:

  • script - The script to execute
  • keys - Any keys that need to be passed to the script
  • args - Any args that need to be passed to the script

Returns:
The return value of the script or null if RedisScript.getResultType() is null, likely indicating a throw-away status reply (i.e. "OK")

posted @ 2025-04-13 20:01  kuki'  阅读(41)  评论(0)    收藏  举报