Home Database Mysql Tutorial scala作为 redis client

scala作为 redis client

Jun 07, 2016 pm 04:38 PM
client ma redis scala use

我是使用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>
Copy after login

使用代码如下:
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>
    
    


Copy after login
Statement of this Website
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

Hot Article

Hot Article

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Solution to 0x80242008 error when installing Windows 11 10.0.22000.100 Solution to 0x80242008 error when installing Windows 11 10.0.22000.100 May 08, 2024 pm 03:50 PM

Solution to 0x80242008 error when installing Windows 11 10.0.22000.100

BTCC tutorial: How to bind and use MetaMask wallet on BTCC exchange? BTCC tutorial: How to bind and use MetaMask wallet on BTCC exchange? Apr 26, 2024 am 09:40 AM

BTCC tutorial: How to bind and use MetaMask wallet on BTCC exchange?

Analyze PHP function bottlenecks and improve execution efficiency Analyze PHP function bottlenecks and improve execution efficiency Apr 23, 2024 pm 03:42 PM

Analyze PHP function bottlenecks and improve execution efficiency

Is redis a memory cache? Is redis a memory cache? Apr 20, 2024 am 05:26 AM

Is redis a memory cache?

Golang API caching strategy and optimization Golang API caching strategy and optimization May 07, 2024 pm 02:12 PM

Golang API caching strategy and optimization

Is redis a non-relational database? Is redis a non-relational database? Apr 20, 2024 am 05:36 AM

Is redis a non-relational database?

Which one has better performance, erlang or golang? Which one has better performance, erlang or golang? Apr 21, 2024 am 03:24 AM

Which one has better performance, erlang or golang?

Caching mechanism and application practice in PHP development Caching mechanism and application practice in PHP development May 09, 2024 pm 01:30 PM

Caching mechanism and application practice in PHP development

See all articles