Redis of Java client Jedis

REVIEW

  • Redis not only use the command to operate the client, and the client can use the program operation.
  • Now largely mainstream languages ​​have client support, such as Java, C, C #, C ++, php, Node.js, Go and so on.
  • In a column in the official website of some of the Java client, there are Jedis, Redisson, Jredis, JDBC-Redis, of which the official recommended Jedis and Redisson.
  • In the enterprise with the most is the Jedis
  • Jedis is also hosted on github, address: https://github.com/xetorthio/jedis

linux turn off the firewall

How to configure specific Redis on liunx, please refer to:

service iptables stop command to turn off the firewall, but after a system reboot will open 

 chkconfig iptables off-- turn off the firewall boot from the start

 Modify: redis.conf profile

Maven project to build

pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.cyb</groupId>
    <artifactId>RedisDemo</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <dependencies>
        <dependency>
            <groupId>redis.clients</groupId>
            <artifactId>jedis</artifactId>
            <version>2.9.0</version>
        </dependency>
    </dependencies>
</project>

测试

Guess you like

Origin www.cnblogs.com/chenyanbin/p/12088796.html