diff --git a/build.gradle b/build.gradle index 58e8d27445..b25fdeec37 100644 --- a/build.gradle +++ b/build.gradle @@ -62,7 +62,7 @@ ext { assertkVersion = '0.28.1' avroVersion = '1.12.0' awaitilityVersion = '4.3.0' - camelVersion = '4.11.0' + camelVersion = '4.12.0' commonsDbcp2Version = '2.13.0' commonsIoVersion = '2.19.0' commonsNetVersion = '3.11.1' @@ -75,7 +75,7 @@ ext { groovyVersion = '4.0.27' hamcrestVersion = '3.0' hazelcastVersion = '5.5.0' - hibernateVersion = '6.6.17.Final' + hibernateVersion = '7.0.0.Final' hsqldbVersion = '2.7.4' h2Version = '2.3.232' jacksonVersion = '2.19.0' @@ -83,19 +83,19 @@ ext { jcifsVersion = '2.1.39' jeroMqVersion = '0.6.0' jmsApiVersion = '3.1.0' - jpaApiVersion = '3.1.0' - jrubyVersion = '9.4.12.1' + jpaApiVersion = '3.2.0' + jrubyVersion = '10.0.0.1' jsonpathVersion = '2.9.0' junit4Version = '4.13.2' junitJupiterVersion = '5.12.2' kotlinCoroutinesVersion = '1.10.2' kryoVersion = '5.6.2' - lettuceVersion = '6.6.0.RELEASE' + lettuceVersion = '6.7.1.RELEASE' log4jVersion = '2.24.3' mailVersion = '2.0.3' micrometerTracingVersion = '1.5.0' micrometerVersion = '1.15.0' - mockitoVersion = '5.17.0' + mockitoVersion = '5.18.0' mongoDriverVersion = '5.5.0' mysqlVersion = '9.3.0' oracleVersion = '23.8.0.25.04' @@ -103,20 +103,20 @@ ext { postgresVersion = '42.7.6' protobufVersion = '4.31.1' r2dbch2Version = '1.0.0.RELEASE' - reactorVersion = '2024.0.6' + reactorVersion = '2025.0.0-SNAPSHOT' resilience4jVersion = '2.3.0' romeToolsVersion = '2.1.0' rsocketVersion = '1.1.5' servletApiVersion = '6.1.0' smackVersion = '4.4.8' - springAmqpVersion = '3.2.5' + springAmqpVersion = '4.0.0-SNAPSHOT' springDataVersion = '2025.1.0-SNAPSHOT' springGraphqlVersion = '1.4.0' - springKafkaVersion = '3.3.6' + springKafkaVersion = '4.0.0-SNAPSHOT' springRetryVersion = '2.0.12' springSecurityVersion = '7.0.0-SNAPSHOT' springVersion = '7.0.0-SNAPSHOT' - springWsVersion = '4.1.0' + springWsVersion = '5.0.0-SNAPSHOT' testcontainersVersion = '1.21.1' tomcatVersion = '11.0.7' xmlUnitVersion = '2.10.2' @@ -137,6 +137,7 @@ allprojects { maven { url 'https://repo.spring.io/milestone' } if (version.endsWith('SNAPSHOT')) { maven { url 'https://repo.spring.io/snapshot' } + maven { url 'https://oss.sonatype.org/content/repositories/snapshots' } } // maven { url 'https://repo.spring.io/libs-staging-local' } } @@ -384,7 +385,7 @@ configure(javaProjects) { subproject -> checkstyle { configDirectory.set(rootProject.file('src/checkstyle')) - toolVersion = project.hasProperty('checkstyleVersion') ? project.checkstyleVersion : '10.23.1' + toolVersion = project.hasProperty('checkstyleVersion') ? project.checkstyleVersion : '10.25.0' } jar { diff --git a/spring-integration-amqp/src/test/java/org/springframework/integration/amqp/inbound/AmqpMessageSourceTests.java b/spring-integration-amqp/src/test/java/org/springframework/integration/amqp/inbound/AmqpMessageSourceTests.java index e464f4a670..14d6c523e2 100644 --- a/spring-integration-amqp/src/test/java/org/springframework/integration/amqp/inbound/AmqpMessageSourceTests.java +++ b/spring-integration-amqp/src/test/java/org/springframework/integration/amqp/inbound/AmqpMessageSourceTests.java @@ -48,6 +48,7 @@ import static org.mockito.Mockito.verify; /** * @author Gary Russell + * @author Artem Bilan * * @since 5.0.1 * @@ -59,7 +60,10 @@ public class AmqpMessageSourceTests { Channel channel = mock(Channel.class); willReturn(true).given(channel).isOpen(); Envelope envelope = new Envelope(123L, false, "ex", "rk"); - BasicProperties props = new BasicProperties.Builder().build(); + BasicProperties props = + new BasicProperties.Builder() + .contentType(MessageProperties.DEFAULT_CONTENT_TYPE) + .build(); GetResponse getResponse = new GetResponse(envelope, props, "bar".getBytes(), 0); willReturn(getResponse).given(channel).basicGet("foo", false); Connection connection = mock(Connection.class); @@ -107,7 +111,10 @@ public class AmqpMessageSourceTests { Channel channel = mock(Channel.class); willReturn(true).given(channel).isOpen(); Envelope envelope = new Envelope(123L, false, "ex", "rk"); - BasicProperties props = new BasicProperties.Builder().build(); + BasicProperties props = + new BasicProperties.Builder() + .contentType(MessageProperties.DEFAULT_CONTENT_TYPE) + .build(); GetResponse getResponse = new GetResponse(envelope, props, "bar".getBytes(), 0); willReturn(getResponse).given(channel).basicGet("foo", false); Connection connection = mock(Connection.class); @@ -145,10 +152,10 @@ public class AmqpMessageSourceTests { willReturn(true).given(channel).isOpen(); Envelope envelope = new Envelope(123L, false, "ex", "rk"); BasicProperties props = new BasicProperties.Builder() - .headers(batched.getMessage().getMessageProperties().getHeaders()) + .headers(batched.message().getMessageProperties().getHeaders()) .contentType("text/plain") .build(); - GetResponse getResponse = new GetResponse(envelope, props, batched.getMessage().getBody(), 0); + GetResponse getResponse = new GetResponse(envelope, props, batched.message().getBody(), 0); willReturn(getResponse).given(channel).basicGet("foo", false); Connection connection = mock(Connection.class); willReturn(true).given(connection).isOpen(); diff --git a/spring-integration-jpa/src/test/java/org/springframework/integration/jpa/core/HibernateJpaOperationsTests.java b/spring-integration-jpa/src/test/java/org/springframework/integration/jpa/core/HibernateJpaOperationsTests.java index d2f9b1799f..e6bff21f12 100644 --- a/spring-integration-jpa/src/test/java/org/springframework/integration/jpa/core/HibernateJpaOperationsTests.java +++ b/spring-integration-jpa/src/test/java/org/springframework/integration/jpa/core/HibernateJpaOperationsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2024 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,6 +18,7 @@ package org.springframework.integration.jpa.core; import java.text.ParseException; import java.text.SimpleDateFormat; +import java.time.LocalDate; import java.util.ArrayList; import java.util.List; @@ -168,13 +169,11 @@ public class HibernateJpaOperationsTests { Object[] retrievedStudent = (Object[]) students.iterator().next(); - SimpleDateFormat formatter = new SimpleDateFormat("yyyy/MM/dd"); - assertThat(retrievedStudent[0]).isNotNull(); assertThat(retrievedStudent[1]).isEqualTo("First One"); assertThat(retrievedStudent[2]).isEqualTo("Last One"); assertThat(retrievedStudent[3]).isEqualTo("M"); - assertThat(retrievedStudent[4]).isEqualTo(formatter.parse("1980/01/01")); + assertThat(retrievedStudent[4]).isEqualTo(LocalDate.parse("1980-01-01")); assertThat(retrievedStudent[5]).isNotNull(); } diff --git a/spring-integration-jpa/src/test/java/org/springframework/integration/jpa/outbound/JpaOutboundGatewayTests.java b/spring-integration-jpa/src/test/java/org/springframework/integration/jpa/outbound/JpaOutboundGatewayTests.java index b0b092cca7..b20a4cda57 100644 --- a/spring-integration-jpa/src/test/java/org/springframework/integration/jpa/outbound/JpaOutboundGatewayTests.java +++ b/spring-integration-jpa/src/test/java/org/springframework/integration/jpa/outbound/JpaOutboundGatewayTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2024 the original author or authors. + * Copyright 2002-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -82,7 +82,7 @@ public class JpaOutboundGatewayTests { student.setRollNumber(3424234234L); assertThatIllegalArgumentException() .isThrownBy(() -> studentService.deleteStudent(student)) - .withMessageStartingWith("Removing a detached instance"); + .withMessageStartingWith("Given entity is not associated with the persistence context"); } @Test diff --git a/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/config/xml/KafkaOutboundAdapterParserTests.java b/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/config/xml/KafkaOutboundAdapterParserTests.java index b60793bda8..68481de291 100644 --- a/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/config/xml/KafkaOutboundAdapterParserTests.java +++ b/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/config/xml/KafkaOutboundAdapterParserTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2024 the original author or authors. + * Copyright 2013-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,6 +27,7 @@ import org.apache.kafka.clients.producer.MockProducer; import org.apache.kafka.clients.producer.ProducerConfig; import org.apache.kafka.common.serialization.IntegerSerializer; import org.apache.kafka.common.serialization.StringSerializer; +import org.apache.kafka.test.MockPartitioner; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanFactory; @@ -102,7 +103,7 @@ class KafkaOutboundAdapterParserTests { @Test void testSyncMode() { MockProducer mockProducer = - new MockProducer<>(false, new IntegerSerializer(), new StringSerializer()) { + new MockProducer<>(false, new MockPartitioner(), new IntegerSerializer(), new StringSerializer()) { @Override public void close(Duration timeout) { @@ -128,12 +129,12 @@ class KafkaOutboundAdapterParserTests { ExecutorService executorService = Executors.newSingleThreadExecutor(); executorService.submit(() -> { - RuntimeException exception = new RuntimeException("Async Producer Mock exception"); - while (!mockProducer.errorNext(exception)) { - Thread.sleep(100); - } - return null; - }); + RuntimeException exception = new RuntimeException("Async Producer Mock exception"); + while (!mockProducer.errorNext(exception)) { + Thread.sleep(100); + } + return null; + }); assertThatExceptionOfType(MessageHandlingException.class) .isThrownBy(() -> handler.handleMessage(new GenericMessage<>("foo"))) diff --git a/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/inbound/InboundGatewayTests.java b/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/inbound/InboundGatewayTests.java index ec09323ecd..0af6037c03 100644 --- a/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/inbound/InboundGatewayTests.java +++ b/spring-integration-kafka/src/test/java/org/springframework/integration/kafka/inbound/InboundGatewayTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2023 the original author or authors. + * Copyright 2018-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -76,7 +76,6 @@ import static org.springframework.kafka.test.assertj.KafkaConditions.value; * */ @EmbeddedKafka(controlledShutdown = true, - kraft = false, topics = {InboundGatewayTests.topic1, InboundGatewayTests.topic2, InboundGatewayTests.topic3, diff --git a/spring-integration-kafka/src/test/kotlin/org/springframework/integration/kafka/dsl/kotlin/KafkaDslKotlinTests.kt b/spring-integration-kafka/src/test/kotlin/org/springframework/integration/kafka/dsl/kotlin/KafkaDslKotlinTests.kt index 785acb08bd..4dd8796d04 100644 --- a/spring-integration-kafka/src/test/kotlin/org/springframework/integration/kafka/dsl/kotlin/KafkaDslKotlinTests.kt +++ b/spring-integration-kafka/src/test/kotlin/org/springframework/integration/kafka/dsl/kotlin/KafkaDslKotlinTests.kt @@ -1,5 +1,5 @@ /* - * Copyright 2018-2023 the original author or authors. + * Copyright 2018-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -210,7 +210,7 @@ class KafkaDslKotlinTests { @Bean fun consumerFactory(): ConsumerFactory { - val props = KafkaTestUtils.consumerProps(this.embeddedKafkaBrokers, "kotlin-group-test1", "false") + val props = KafkaTestUtils.consumerProps(this.embeddedKafkaBrokers, "kotlin-group-test1", false) props[ConsumerConfig.AUTO_OFFSET_RESET_CONFIG] = "earliest" return DefaultKafkaConsumerFactory(props) } diff --git a/src/checkstyle/checkstyle.xml b/src/checkstyle/checkstyle.xml index 81d8c697d0..863d0aed72 100644 --- a/src/checkstyle/checkstyle.xml +++ b/src/checkstyle/checkstyle.xml @@ -87,7 +87,6 @@ org.mockito.AdditionalAnswers.*, org.mockito.ArgumentMatchers.*, org.mockito.AdditionalMatchers.*, - org.springframework.integration.gemfire.config.xml.ParserTestUtil.*, org.springframework.kafka.test.assertj.KafkaConditions.*, org.springframework.integration.test.mock.MockIntegration.*, org.springframework.integration.test.util.TestUtils.*,