Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

7.4 RedisPlugin is used in non-web environments


May 14, 2021 JFinal manual



RedisPlugin can also be used in a non-web environment, simply by introducing jfinal.jar and then calling redisPlugin.start() more, and here's an example of the code:

public class RedisTest {
public static void main(String[] args) {
RedisPlugin rp = new RedisPlugin("myRedis", "localhost");
The only difference with the web is that the start() method rp.start() needs to be called here once;

Redis. use ().set("key", "value");
Redis. use ().get("key");
}
}