Home >Database >Mysql Tutorial >scala作为 redis client

scala作为 redis client

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-07 16:38:091430browse

我是使用maven 来构建我的scala 项目的因此我需要使用mvn 源 地址如下 http://maven.outofmemory.cn/com.top10/ 然后修改 项目下的pom.xml增加依赖 dependency groupIdcom.top10/groupId artifactIdscala-redis-client_2.10/artifactId version1.13.0/versio

我是使用maven 来构建我的scala 项目的因此我需要使用mvn 源
地址如下
http://maven.outofmemory.cn/com.top10/

然后修改 项目下的pom.xml增加依赖

 <dependency>
      <groupid>com.top10</groupid>
      <artifactid>scala-redis-client_2.10</artifactid>
      <version>1.13.0</version>
    </dependency>

使用代码如下:
1.引入包
import com.top10.redis._

2. 调用代码

val redis = new SingleRedis("10.10.200.11", 6379)
redis.set(id,id.toString())
println(redis.get(id)+"
<p>更多用法请参看源码<br>
https://github.com/top10/scala-redis-client</p>
    <p class="copyright">
        原文地址:scala作为 redis client, 感谢原作者分享。
    </p>
    
    


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn