Skip to content

Commit fcc6e43

Browse files
committedJul 13, 2024·
♻️ refactor: update codebase #2
1 parent 3e9397b commit fcc6e43

File tree

5 files changed

+77
-0
lines changed

5 files changed

+77
-0
lines changed
 

‎README.md

+18
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,24 @@ ng:
7171
source: ""
7272
```
7373
74+
## Add dependencies
75+
76+
```groovy
77+
// The "spring-data-redis" library, version 2.7.8, is a Spring Data module that provides easy configuration and access to Redis from Spring applications,
78+
// offering comprehensive support for Redis operations, including connection management, RedisTemplate, and repository support for Spring Data.
79+
implementation group: 'org.springframework.data', name: 'spring-data-redis', version: '2.7.8'
80+
// The "spring-integration-redis" library, version 5.5.20, is a Spring Integration module that provides support for Redis-based messaging,
81+
// enabling integration with Redis to send and receive messages, as well as leveraging Redis Pub/Sub capabilities within Spring applications.
82+
// Using runtimeOnly to ensure this dependency is only included at runtime.
83+
runtimeOnly group: 'org.springframework.integration', name: 'spring-integration-redis', version: '5.5.20'
84+
// The "lettuce-core" library, version 6.2.3.RELEASE, is a powerful and thread-safe Redis client for Java,
85+
// providing asynchronous, synchronous, and reactive API support to efficiently interact with Redis servers.
86+
implementation group: 'io.lettuce', name: 'lettuce-core', version: '6.2.3.RELEASE'
87+
// The "jedis" library, version 5.1.3, is a simple and feature-rich Java client for Redis,
88+
// providing synchronous and asynchronous communication with Redis servers to perform various operations and transactions.
89+
implementation group: 'redis.clients', name: 'jedis', version: '5.1.3'
90+
```
91+
7492
## Integration
7593
7694
1. Add dependency into file `build.gradle`

‎plugin/build.gradle

+13
Original file line numberDiff line numberDiff line change
@@ -172,4 +172,17 @@ dependencies {
172172
// The "spring-boot-configuration-processor" library, version 2.7.18,
173173
// is a Spring Boot module that processes configuration metadata annotations to generate metadata files and aid in auto-configuration of Spring applications.
174174
implementation group: 'org.springframework.boot', name: 'spring-boot-configuration-processor', version: '2.7.18'
175+
// The "spring-data-redis" library, version 2.7.8, is a Spring Data module that provides easy configuration and access to Redis from Spring applications,
176+
// offering comprehensive support for Redis operations, including connection management, RedisTemplate, and repository support for Spring Data.
177+
implementation group: 'org.springframework.data', name: 'spring-data-redis', version: '2.7.8'
178+
// The "spring-integration-redis" library, version 5.5.20, is a Spring Integration module that provides support for Redis-based messaging,
179+
// enabling integration with Redis to send and receive messages, as well as leveraging Redis Pub/Sub capabilities within Spring applications.
180+
// Using runtimeOnly to ensure this dependency is only included at runtime.
181+
runtimeOnly group: 'org.springframework.integration', name: 'spring-integration-redis', version: '5.5.20'
182+
// The "lettuce-core" library, version 6.2.3.RELEASE, is a powerful and thread-safe Redis client for Java,
183+
// providing asynchronous, synchronous, and reactive API support to efficiently interact with Redis servers.
184+
implementation group: 'io.lettuce', name: 'lettuce-core', version: '6.2.3.RELEASE'
185+
// The "jedis" library, version 5.1.3, is a simple and feature-rich Java client for Redis,
186+
// providing synchronous and asynchronous communication with Redis servers to perform various operations and transactions.
187+
implementation group: 'redis.clients', name: 'jedis', version: '5.1.3'
175188
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package org.redis4j.common;
2+
3+
import org.slf4j.Logger;
4+
import org.slf4j.LoggerFactory;
5+
6+
public class Redis4j {
7+
protected static final Logger logger = LoggerFactory.getLogger(Redis4j.class);
8+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package org.redis4j.config.props;
2+
3+
import org.springframework.boot.context.properties.ConfigurationProperties;
4+
import org.springframework.stereotype.Component;
5+
6+
import java.io.Serializable;
7+
8+
@SuppressWarnings({""})
9+
@Component
10+
@ConfigurationProperties(prefix = "spring.redis4j")
11+
public class Redis4jProperties implements Serializable {
12+
public Redis4jProperties() {
13+
super();
14+
}
15+
16+
private boolean enabled = false;
17+
18+
public boolean isEnabled() {
19+
return enabled;
20+
}
21+
22+
public void setEnabled(boolean enabled) {
23+
this.enabled = enabled;
24+
}
25+
26+
@Override
27+
public String toString() {
28+
return String.format("Redis4j { enabled: %s }", enabled);
29+
}
30+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# ################################
2+
# Spring Redis4J Config
3+
# 2024-06-16 10:48:54
4+
# ################################
5+
spring:
6+
# noinspection SpellCheckingInspection
7+
redis4j:
8+
enabled: false

0 commit comments

Comments
 (0)