package com.chenyun.web;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.connection.RedisZSetCommands;
import org.springframework.data.redis.core.*;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import redis.clients.jedis.Jedis;
import java.util.*;
@Controller
@ResponseBody
public class HelloRedisController {
@RequestMapping("/test")
public Map<String,Object> helloRedis(){
Map<String,Object> map = new HashMap<>();
map.put("success",true);
map.put("asadfa","aad");
return map;
}
@Autowired
private RedisTemplate redisTemplate;
@Autowired
private StringRedisTemplate stringRedisTemplate;
@RequestMapping("/stringAnd
SpringBoot 第十六篇 之 Redis 基本数据类型操作
最新推荐文章于 2024-04-09 21:36:28 发布