您的位置:首页 > 数据库 > Redis

Redis的介绍及使用实例.

2016-08-25 23:38 225 查看
本文就来讲一下Redis安装的方法和Redis生成主键的优点以及和其他几种方式生成主键的对比.

1,Redis安装
首先将Redis的tar包拷贝到Linux下的根目录

<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:task="http://www.springframework.org/schema/task"
xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-4.0.xsd http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd"> 
<!-- 整合Redis-->
<bean id="jdis" class="redis.clients.jedis.Jedis">
<constructor-arg value="192.168.200.128" index="0" type="java.lang.String"/>
<constructor-arg value="6379" index="1"/>
</bean>

</beans>


View Code



关于Redis的使用暂时就这么多, 下次还会继续分享更多的内容.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: