Skip to main content

Jedis-Web应用版

演示一个web中jedis客户端的使用,更多使用方式请参考dawdler-client-plug-jedis.

1. 下载并运行

下载示例dawdler-tutorial.zip,版本为jdk1.8.

解压后,进入jedis-single-user-web-api目录中.

运行UserWebApplication.java的main方法.

@DawdlerBootApplication
public class UserWebApplication {
public static void main(String[] args) throws Throwable {
DawdlerWebApplication.run(UserWebApplication.class, args);
}
}

通过postman或游览器访问 http://localhost:8085/user/info?id=1

1.1 配置文件说明

1.1.1 redis.properties

redis连接配置也支持放在统一配置中心.

相关配置参考dawdler-jedis-core.