1 不可重入锁 @GetMapping("/test") public JsonData test(@RequestParam(name="key")String key,@RequestParam(name="accountNo")Long accountNo){ //key[1]是key,ARGV[1]是accountNo,ARGV[2]是过期时间 //判断key是否存在 String script = "if redis.call('EXISTS',KEYS[1])==0 then" + //不存在则设置key和value " red