106 Star 556 Fork 217

ztp / redisson-spring-boot-starter

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
cache.md 755 Bytes
一键复制 编辑 原始数据 按行查看 历史
zengtengpeng 提交于 2019-04-02 13:17 . 增加spring cache session集群

package com.zengtengpeng.test.controller;

import com.zengtengpeng.test.bean.User; import org.springframework.cache.annotation.Cacheable; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody;

@Controller public class CacheController {

@RequestMapping("/cache1")
@ResponseBody
@Cacheable(value = "cache1",key = "'test1'")
public String cache1(){
    return "test";
}
@RequestMapping("/cache2")
@ResponseBody
@Cacheable(value = "cache2",key = "'test2'")
public User cache2(){
    User user=new User();
    user.setName("name");
    user.setAge("123");
    return user;
}

}

Java
1
https://gitee.com/ztp/redisson-spring-boot-starter.git
git@gitee.com:ztp/redisson-spring-boot-starter.git
ztp
redisson-spring-boot-starter
redisson-spring-boot-starter
master

搜索帮助