当前位置:K88软件开发文章中心网站服务器框架JFinal → 文章内容

7.4 非 web 环境使用 RedisPlugin

减小字体 增大字体 作者:佚名  来源:网上搜集  发布时间:2019-1-25 14:22:14

由 厦门小懒懒 创建, 最后一次修改 2016-10-06 RedisPlugin  也 可 以 在 非 web  环 境 下 使 用 , 只需 引入 jfinal.jar  然 后 多 调用一下redisPlugin.start()即可,以下是代码示例:public class RedisTest {public static void main(String[] args) {RedisPlugin rp = new RedisPlugin("myRedis", "localhost");// 与web下唯一区别是需要这里调用一次start()方法rp.start(); Redis.use().set("key", "value");Redis.use().get("key");}}

7.4 非 web 环境使用 RedisPlugin