diff --git a/README.md b/README.md
index ef3e9738..61451f98 100644
--- a/README.md
+++ b/README.md
@@ -52,9 +52,9 @@ well, where all services code is in Spring.
### Requirements
-* Spring 5+, 6+
+* Spring 5+, 6+, 7+
* Java 1.8+,17
-* Spring boot 2+,3+
+* Spring boot 2+,3+,4+
* Lettuce client for Redis cluster
* Read master preference for Redis cluster
@@ -98,6 +98,7 @@ from [Maven central](https://search.maven.org/search?q=g:com.github.sonus21%20AN
* For spring framework 5.x use rqueue-spring 2.x
* For spring framework 6.x use rqueue-spring 3.x
+* For spring framework 7.x use rqueue-spring 4.x
Get the latest one
from [Maven central](https://search.maven.org/search?q=g:com.github.sonus21%20AND%20a:rqueue-spring)
diff --git a/build.gradle b/build.gradle
index 74f54259..71d12cdf 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,8 +1,8 @@
plugins {
id "jacoco"
id 'com.github.kt3k.coveralls' version '2.12.2'
- id "com.adarshr.test-logger" version "3.2.0"
- id "org.gradle.test-retry" version "1.5.0"
+ id "com.adarshr.test-logger" version "4.0.0"
+ id "org.gradle.test-retry" version "1.6.4"
}
allprojects {
@@ -12,8 +12,10 @@ allprojects {
apply plugin: "com.adarshr.test-logger"
apply plugin: "org.gradle.test-retry"
- sourceCompatibility = 17
- targetCompatibility = 17
+ java {
+ sourceCompatibility = "17"
+ targetCompatibility = "17"
+ }
repositories {
mavenCentral()
@@ -22,15 +24,15 @@ allprojects {
}
ext {
- springBootVersion = "3.0.1"
- springVersion = "6.0.3"
- springDataVersion = "3.0.0"
- microMeterVersion = "1.10.2"
+ springBootVersion = "4.0.1"
+ springVersion = "7.0.3"
+ springDataVersion = "4.0.2"
+ microMeterVersion = "1.16.2"
// logging dependencies
- lombokVersion = "1.18.30"
- logbackVersion = "1.4.5"
- sl4jVersion = "2.0.6"
+ lombokVersion = "1.18.42"
+ logbackVersion = "1.5.25"
+ sl4jVersion = "2.0.17"
// testing
jupiterVersion = "5.5.0"
@@ -42,34 +44,35 @@ ext {
tomcatVersion = "10.1.4"
// utility
- lang3Version = "3.9"
- jacksonVersion = "2.14.1"
+ lang3Version = "3.20.0"
+ jacksonVersion = "3.0.3"
+ jacksonAnnotationsVersion = "2.21"
// server
- jakartaServletVersion = "6.0.0"
- pebbleVersion = "3.2.2"
+ jakartaServletVersion = "6.1.0"
+ pebbleVersion = "4.1.0"
// database
- lettuceVersion = "6.2.2.RELEASE"
- jakartaAnnotationVersion = "2.1.0"
- jakartaPersistenceVersion = "3.1.0"
- hibernateCoreVersion = "5.6.14.Final"
+ lettuceVersion = "7.2.1.RELEASE"
+ jakartaAnnotationVersion = "3.0.0"
+ jakartaPersistenceVersion = "3.2.0"
+ hibernateCoreVersion = "7.2.1.Final"
// other dependencies
- jakartaValidationApiVersion = "3.0.2"
+ jakartaValidationApiVersion = "3.1.1"
serucoEncodingVersion = "0.1.3"
- apacheCommonCollectionVerion = "4.4"
- hibernateValidatorVersion = "7.0.5.Final"
- springDepManagementVersion = "1.1.0"
- projectReactorReactorTestVersion = "3.5.1"
- aspectjVersion = "1.9.19"
- guavaVersion = "32.1.1-jre"
+ apacheCommonCollectionVerion = "4.5.0"
+ hibernateValidatorVersion = "9.1.0.Final"
+ springDepManagementVersion = "1.1.7"
+ projectReactorReactorTestVersion = "3.8.2"
+ aspectjVersion = "1.9.25.1"
+ guavaVersion = "33.5.0-jre"
}
subprojects {
group = "com.github.sonus21"
- version = "3.4.0-RELEASE"
+ version = "4.0.0-RELEASE"
dependencies {
// https://mvnrepository.com/artifact/org.springframework/spring-messaging
@@ -94,6 +97,7 @@ subprojects {
// https://mvnrepository.com/artifact/ch.qos.logback/logback-classic
testImplementation "ch.qos.logback:logback-classic:${logbackVersion}"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${jupiterVersion}"
+ testRuntimeOnly "org.junit.platform:junit-platform-launcher:6.0.2"
testImplementation "org.junit.jupiter:junit-jupiter-api:${jupiterVersion}"
testImplementation "org.junit.jupiter:junit-jupiter-params:${jupiterVersion}"
// https://mvnrepository.com/artifact/org.mockito/mockito-inline
diff --git a/docs/index.md b/docs/index.md
index 3d153c11..6e0d5deb 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -52,8 +52,8 @@ frameworks.
### Requirements
-* Spring 5+, 6+
-* Spring Boot 2+, 3+
+* Spring 5+, 6+, 7+
+* Spring Boot 2+, 3+, 4+
* Spring Reactive
* Lettuce client for Redis cluster
* Read master preference for Redis cluster
@@ -82,8 +82,8 @@ Redis cluster compatibility, otherwise the application may fail to start.
### Spring Boot
{: .warning }
-Use Rqueue Spring Boot Starter 3.x for Spring Boot 3.x, and Rqueue Spring Boot Starter 2.x for
-Spring Boot 2.x.
+Use Rqueue Spring Boot Starter 4.x for Spring Boot 4.x, Rqueue Spring Boot Starter 3.x for
+Spring Boot 3.x, and Rqueue Spring Boot Starter 2.x for Spring Boot 2.x.
Get the latest version of Rqueue Spring Boot Starter from [Maven Central][Boot Maven Central]. Add
the dependency to your project:
@@ -125,7 +125,8 @@ the dependency to your project:
### Spring Framework
{: .warning }
-Use Rqueue Spring 3.x for Spring Framework 6.x, and Rqueue Spring 2.x for Spring Framework 5.x.
+Use Rqueue Spring 4.x for Spring Framework 7.x, Rqueue Spring 3.x for Spring Framework 6.x,
+and Rqueue Spring 2.x for Spring Framework 5.x.
Get the latest version of Rqueue Spring from [Maven Central][Maven Central]. Add the dependency to
your project:
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index 943f0cbf..d64cd491 100644
Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 3499ded5..19a6bdeb 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.0-bin.zip
networkTimeout=10000
+validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/gradlew b/gradlew
index 65dcd68d..1aa94a42 100755
--- a/gradlew
+++ b/gradlew
@@ -83,10 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
-APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
+APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
@@ -133,10 +131,13 @@ location of your Java installation."
fi
else
JAVACMD=java
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+ if ! command -v java >/dev/null 2>&1
+ then
+ die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
+ fi
fi
# Increase the maximum file descriptors if we can.
@@ -144,7 +145,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
- # shellcheck disable=SC3045
+ # shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
@@ -152,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
- # shellcheck disable=SC3045
+ # shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
@@ -197,11 +198,15 @@ if "$cygwin" || "$msys" ; then
done
fi
-# Collect all arguments for the java command;
-# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
-# shell script including quotes and variable substitutions, so put them in
-# double quotes to make sure that they get re-expanded; and
-# * put everything else in single quotes, so that it's not re-expanded.
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+
+# Collect all arguments for the java command:
+# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
+# and any embedded shellness will be escaped.
+# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
+# treated as '${Hostname}' itself on the command line.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
diff --git a/rqueue-core/build.gradle b/rqueue-core/build.gradle
index 8f051264..75812407 100644
--- a/rqueue-core/build.gradle
+++ b/rqueue-core/build.gradle
@@ -41,13 +41,15 @@ mavenPublishing {
dependencies {
// https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core
- api "com.fasterxml.jackson.core:jackson-core:${jacksonVersion}"
- api "com.fasterxml.jackson.core:jackson-annotations:${jacksonVersion}"
- api "com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}"
+ api "tools.jackson.core:jackson-core:${jacksonVersion}"
+ api "tools.jackson.core:jackson-databind:${jacksonVersion}"
+ api "com.fasterxml.jackson.core:jackson-annotations:${jacksonAnnotationsVersion}"
// https://mvnrepository.com/artifact/jakarta.servlet/jakarta.servlet-api
api "jakarta.servlet:jakarta.servlet-api:${jakartaServletVersion}"
// https://mvnrepository.com/artifact/jakarta.validation/jakarta.validation-api
api "jakarta.validation:jakarta.validation-api:${jakartaValidationApiVersion}"
+ implementation 'jakarta.el:jakarta.el-api:5.0.0'
+ runtimeOnly 'org.glassfish:jakarta.el:4.0.2'
// https://mvnrepository.com/artifact/org.springframework/spring-webmvc
api "org.springframework:spring-webmvc:${springVersion}"
api "org.springframework:spring-webflux:${springVersion}"
diff --git a/rqueue-core/src/main/java/com/github/sonus21/rqueue/converter/GenericMessageConverter.java b/rqueue-core/src/main/java/com/github/sonus21/rqueue/converter/GenericMessageConverter.java
index 515dd1bb..c2fccea2 100644
--- a/rqueue-core/src/main/java/com/github/sonus21/rqueue/converter/GenericMessageConverter.java
+++ b/rqueue-core/src/main/java/com/github/sonus21/rqueue/converter/GenericMessageConverter.java
@@ -18,9 +18,6 @@
import static org.springframework.util.Assert.notNull;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.JavaType;
-import com.fasterxml.jackson.databind.ObjectMapper;
import com.github.sonus21.rqueue.utils.SerializationUtils;
import java.lang.reflect.TypeVariable;
import java.util.Collection;
@@ -34,6 +31,9 @@
import org.springframework.messaging.MessageHeaders;
import org.springframework.messaging.converter.SmartMessageConverter;
import org.springframework.messaging.support.GenericMessage;
+import tools.jackson.core.JacksonException;
+import tools.jackson.databind.JavaType;
+import tools.jackson.databind.ObjectMapper;
/**
* A converter to turn the payload of a {@link Message} from serialized form to a typed String and
@@ -212,7 +212,7 @@ public String serialize(Object payload) {
String msg = objectMapper.writeValueAsString(payload);
Msg message = new Msg(msg, name);
return objectMapper.writeValueAsString(message);
- } catch (JsonProcessingException e) {
+ } catch (JacksonException e) {
log.debug("Serialisation failed", e);
return null;
}
diff --git a/rqueue-core/src/main/java/com/github/sonus21/rqueue/converter/JsonMessageConverter.java b/rqueue-core/src/main/java/com/github/sonus21/rqueue/converter/JsonMessageConverter.java
index 84fb3da1..3ee447d3 100644
--- a/rqueue-core/src/main/java/com/github/sonus21/rqueue/converter/JsonMessageConverter.java
+++ b/rqueue-core/src/main/java/com/github/sonus21/rqueue/converter/JsonMessageConverter.java
@@ -18,15 +18,15 @@
import static org.springframework.util.Assert.notNull;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
import com.github.sonus21.rqueue.utils.SerializationUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessageHeaders;
-import org.springframework.messaging.converter.MappingJackson2MessageConverter;
+import org.springframework.messaging.converter.JacksonJsonMessageConverter;
import org.springframework.messaging.converter.MessageConverter;
import org.springframework.messaging.support.GenericMessage;
+import tools.jackson.core.JacksonException;
+import tools.jackson.databind.ObjectMapper;
/**
* JsonMessageConverter tries to convert to JSON and from JSON to object.
@@ -37,7 +37,7 @@
*
Target class is null till the time method arguments are not resolved, once method arguments
* are resolved then it will become non-null.
*
- * @see MappingJackson2MessageConverter
+ * @see JacksonJsonMessageConverter
*/
@Slf4j
public class JsonMessageConverter implements MessageConverter {
@@ -65,7 +65,7 @@ public Object fromMessage(Message> message, Class> targetClass) {
return objectMapper.readValue(payload, targetClass);
}
return null;
- } catch (JsonProcessingException | ClassCastException e) {
+ } catch (JacksonException | ClassCastException e) {
log.debug("Deserialization of message {} failed", message, e);
return null;
}
@@ -77,7 +77,7 @@ public Message> toMessage(Object payload, MessageHeaders headers) {
try {
String msg = objectMapper.writeValueAsString(payload);
return new GenericMessage<>(msg);
- } catch (JsonProcessingException e) {
+ } catch (JacksonException e) {
log.debug("Serialisation failed, Payload: {}", payload, e);
return null;
}
diff --git a/rqueue-core/src/main/java/com/github/sonus21/rqueue/converter/RqueueRedisSerializer.java b/rqueue-core/src/main/java/com/github/sonus21/rqueue/converter/RqueueRedisSerializer.java
index 01432afa..b37388bc 100644
--- a/rqueue-core/src/main/java/com/github/sonus21/rqueue/converter/RqueueRedisSerializer.java
+++ b/rqueue-core/src/main/java/com/github/sonus21/rqueue/converter/RqueueRedisSerializer.java
@@ -17,19 +17,19 @@
package com.github.sonus21.rqueue.converter;
import com.fasterxml.jackson.annotation.JsonTypeInfo.As;
-import com.fasterxml.jackson.core.JsonGenerator;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.ObjectMapper.DefaultTyping;
-import com.fasterxml.jackson.databind.SerializerProvider;
-import com.fasterxml.jackson.databind.module.SimpleModule;
-import com.fasterxml.jackson.databind.ser.std.StdSerializer;
import com.github.sonus21.rqueue.utils.SerializationUtils;
-import java.io.IOException;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cache.support.NullValue;
import org.springframework.data.redis.serializer.RedisSerializer;
import org.springframework.data.redis.serializer.SerializationException;
+import tools.jackson.core.JacksonException;
+import tools.jackson.core.JsonGenerator;
+import tools.jackson.databind.DefaultTyping;
+import tools.jackson.databind.ObjectMapper;
+import tools.jackson.databind.SerializationContext;
+import tools.jackson.databind.jsontype.BasicPolymorphicTypeValidator;
+import tools.jackson.databind.module.SimpleModule;
+import tools.jackson.databind.ser.std.StdSerializer;
@Slf4j
public class RqueueRedisSerializer implements RedisSerializer