安装
LOKI 基于JDK8, 支持SpringBoot 2.x, 3.x.
SpringBoot 2.x/3.x
全依赖安装
全依赖包含RocketMQ、Kafka、Redis
<dependency>
<groupId>com.github.guoshiqiufeng</groupId>
<artifactId>loki-spring-boot-starter</artifactId>
<version>1.2.1</version>
</dependency>
implementation 'com.github.guoshiqiufeng:loki-spring-boot-starter:1.2.1'
implementation group: 'com.github.guoshiqiufeng', name: 'loki-spring-boot-starter', version: '1.2.1'
RocketMQ(gRPC)依赖安装
支持 RocketMQ 5.X
<dependency>
<groupId>com.github.guoshiqiufeng</groupId>
<artifactId>loki-spring-boot-starter-rocketmq</artifactId>
<version>1.2.1</version>
</dependency>
implementation 'com.github.guoshiqiufeng:loki-spring-boot-starter-rocketmq:1.2.1'
implementation group: 'com.github.guoshiqiufeng', name: 'loki-spring-boot-starter-rocketmq', version: '1.2.1'
RocketMQ(Remoting)依赖安装
支持 RocketMQ 4.X、5.X
<dependency>
<groupId>com.github.guoshiqiufeng</groupId>
<artifactId>loki-spring-boot-starter-rocketmq-remoting</artifactId>
<version>1.2.1</version>
</dependency>
implementation 'com.github.guoshiqiufeng:loki-spring-boot-starter-rocketmq-remoting:1.2.1'
implementation group: 'com.github.guoshiqiufeng', name: 'loki-spring-boot-starter-rocketmq-remoting', version: '1.2.1'
Kafka依赖安装
<dependency>
<groupId>com.github.guoshiqiufeng</groupId>
<artifactId>loki-spring-boot-starter-kafka</artifactId>
<version>1.2.1</version>
</dependency>
implementation 'com.github.guoshiqiufeng:loki-spring-boot-starter-kafka:1.2.1'
implementation group: 'com.github.guoshiqiufeng', name: 'loki-spring-boot-starter-kafka', version: '1.2.1'
Redis依赖安装
支持Redis 5.x以上
<dependency>
<groupId>com.github.guoshiqiufeng</groupId>
<artifactId>loki-spring-boot-starter-redis</artifactId>
<version>1.2.1</version>
</dependency>
implementation 'com.github.guoshiqiufeng:loki-spring-boot-starter-redis:1.2.1'
implementation group: 'com.github.guoshiqiufeng', name: 'loki-spring-boot-starter-redis', version: '1.2.1'
Bom
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.github.guoshiqiufeng</groupId>
<artifactId>loki-bom</artifactId>
<version>1.2.1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
dependencies {
implementation platform("io.github.guoshiqiufeng:loki-bom:1.2.1")
}