- ·上一篇文章:7.3 Redis 与 Cache
- ·下一篇文章:8.1 概述
7.4 非 web 环境使用 RedisPlugin
由 厦门小懒懒 创建, 最后一次修改 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