1 Star 2 Fork 0

github/redisson

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

Quarkus extension for Redis

Integrates Redisson with Quarkus framework.

Native image with RemoteService. Click to expand!
To use RemoteService in native image add dynamic-proxy.json and reflection-config.json files in `quarkus.native.additional-build-args` setting.
-H:DynamicProxyConfigurationResources=dynamic-proxy.json,-H:ReflectionConfigurationFiles=reflection-config.json

dynamic-proxy.json:

[
    ["<Remote Service interface name>"]
]

reflection-config.json:

[
   {
     "name":"<Remote Service interface name>",
     "allDeclaredMethods":true
   }
]

Usage

1. Add redisson-quarkus dependency into your project:

Maven

<dependency>
    <groupId>org.redisson</groupId>
    <!-- for Quarkus v1.6.x - v1.13.x -->
    <artifactId>redisson-quarkus-16</artifactId>
    <!-- for Quarkus v2.x.x -->
    <artifactId>redisson-quarkus-20</artifactId>
    <version>3.17.7</version>
</dependency>

Gradle

// for Quarkus v1.6.x - v1.13.x
compile 'org.redisson:redisson-quarkus-16:3.17.7'
// for Quarkus v2.x.x
compile 'org.redisson:redisson-quarkus-20:3.17.7'

2. Add settings into application.properties file

Config structure is a flat Redisson YAML configuration - single mode, replicated mode, cluster mode, sentinel mode, proxy mode

NOTE: Setting names in camel case should be joined with hyphens (-).

Below is the configuration for Redisson in single mode.

quarkus.redisson.single-server-config.address=redis://localhost:6379
quarkus.redisson.single-server-config.password=null
quarkus.redisson.threads=16
quarkus.redisson.netty-threads=32

Use quarkus.redisson.file setting to specify path to config file.

3. Use Redisson

@Inject
RedissonClient redisson;

Try Redisson PRO with ultra-fast performance and support by SLA.

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yexw-github/redisson.git
git@gitee.com:yexw-github/redisson.git
yexw-github
redisson
redisson
master

搜索帮助