Skip to content

Commit a92ae4a

Browse files
committed
Start version 6.0
* Upgrade the project to Spring Boot `4.0.x` * Upgrade all the possible dependencies to their latest major/minor versions * Upgrade Gradle to `9.3.1` * Upgrade to Spring Cloud AWS `4.0` and remove redundant now Spring Integration AWS dependency * Fix all the modules for required now new Spring Boot modular dependencies * Fix all the modules for reported deprecations and wrong imports * Remove `com.github.spotbugs` and use `io.spring.nullability` instead
1 parent 8a69f39 commit a92ae4a

113 files changed

Lines changed: 484 additions & 454 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ bin/
77
.idea/
88
out/
99
.vscode/
10+
**/hostkey.ser

build.gradle

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ plugins {
77
id 'base'
88
id 'io.spring.dependency-management' version '1.1.7'
99
id 'io.spring.javaformat' version "${javaFormatVersion}"
10-
id 'com.github.spotbugs' version '6.4.8'
10+
id 'io.spring.nullability' version '0.0.11' apply false
1111
}
1212

1313
description = 'Spring Functions Catalog'
@@ -51,10 +51,11 @@ allprojects {
5151
}
5252

5353
imports {
54-
mavenBom "io.debezium:debezium-bom:$debeziumVersion"
55-
mavenBom "io.awspring.cloud:spring-cloud-aws-dependencies:$springCloudAwsVersion"
56-
mavenBom "org.springframework.boot:spring-boot-dependencies:$springBootVersion"
57-
mavenBom "ai.djl:bom:$djlVersion"
54+
mavenBom 'io.debezium:debezium-bom:3.4.1.Final'
55+
mavenBom 'io.awspring.cloud:spring-cloud-aws-dependencies:4.0.0'
56+
mavenBom 'org.springframework.boot:spring-boot-dependencies:4.0.2'
57+
mavenBom 'ai.djl:bom:0.36.0'
58+
mavenBom 'com.squareup.okhttp3:okhttp-bom:5.3.2'
5859
}
5960
}
6061
}
@@ -65,6 +66,7 @@ configure(javaProjects) { subproject ->
6566
apply plugin: 'idea'
6667
apply plugin: 'checkstyle'
6768
apply plugin: 'io.spring.javaformat'
69+
apply plugin: 'io.spring.nullability'
6870
apply from: "${rootDir}/publish-maven.gradle"
6971

7072
sourceSets {
@@ -77,7 +79,7 @@ configure(javaProjects) { subproject ->
7779

7880
java {
7981
toolchain {
80-
languageVersion = JavaLanguageVersion.of(17)
82+
languageVersion = JavaLanguageVersion.of(25)
8183
}
8284
withJavadocJar()
8385
withSourcesJar()
@@ -86,18 +88,10 @@ configure(javaProjects) { subproject ->
8688
}
8789
}
8890

89-
compileJava {
90-
options.release = 17
91-
}
92-
93-
compileTestJava {
94-
sourceCompatibility = JavaVersion.VERSION_17
95-
targetCompatibility = JavaVersion.VERSION_17
96-
options.encoding = 'UTF-8'
97-
}
98-
9991
tasks.withType(JavaCompile).configureEach {
10092
options.fork = true
93+
sourceCompatibility = JavaVersion.VERSION_17
94+
options.encoding = 'UTF-8'
10195
}
10296

10397
tasks.withType(Javadoc) {
@@ -115,6 +109,10 @@ configure(javaProjects) { subproject ->
115109
configDirectory = rootProject.file('etc/checkstyle')
116110
}
117111

112+
nullability {
113+
requireExplicitNullMarking = false
114+
}
115+
118116
// dependencies that are common across all java projects
119117
dependencies {
120118
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
@@ -128,15 +126,11 @@ configure(javaProjects) { subproject ->
128126
api 'org.springframework.boot:spring-boot-starter-integration'
129127
api 'com.jayway.jsonpath:json-path'
130128

131-
def spotbugsAnnotations = "com.github.spotbugs:spotbugs-annotations:${spotbugs.toolVersion.get()}"
132-
compileOnly spotbugsAnnotations
133-
testCompileOnly spotbugsAnnotations
134-
135129
testImplementation 'org.springframework.boot:spring-boot-starter-test'
136130
testImplementation 'org.springframework.integration:spring-integration-test'
137131
testImplementation 'io.projectreactor:reactor-test'
138132
testImplementation 'org.awaitility:awaitility'
139-
testImplementation 'org.testcontainers:junit-jupiter'
133+
testImplementation 'org.testcontainers:testcontainers-junit-jupiter'
140134

141135
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
142136

@@ -148,8 +142,6 @@ configure(javaProjects) { subproject ->
148142
[compileJava, compileTestJava]*.options*.compilerArgs = ['-Xlint:all,-options,-processing', '-parameters']
149143

150144
test {
151-
maxHeapSize = '2g'
152-
jvmArgs '-XX:+HeapDumpOnOutOfMemoryError'
153145
useJUnitPlatform()
154146

155147
enableAssertions = false
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
11
dependencies {
2-
api springIntegrationAws
3-
api 'io.awspring.cloud:spring-cloud-aws-starter-s3'
4-
api 'software.amazon.awssdk:aws-crt-client'
5-
api 'software.amazon.awssdk:sts'
6-
api 'org.springframework.integration:spring-integration-file'
2+
api 'io.awspring.cloud:spring-cloud-aws-starter-integration-s3'
73
}

common/spring-aws-s3-common/src/main/java/org/springframework/cloud/fn/common/aws/s3/AmazonS3Configuration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121
import io.awspring.cloud.autoconfigure.s3.S3AutoConfiguration;
2222
import io.awspring.cloud.autoconfigure.s3.S3CrtAsyncClientAutoConfiguration;
2323
import io.awspring.cloud.autoconfigure.s3.properties.S3Properties;
24+
import io.awspring.cloud.s3.integration.S3SessionFactory;
2425
import software.amazon.awssdk.services.s3.S3Client;
2526

2627
import org.springframework.boot.autoconfigure.AutoConfiguration;
2728
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
2829
import org.springframework.context.annotation.Bean;
29-
import org.springframework.integration.aws.support.S3SessionFactory;
3030

3131
/**
3232
* The auto-configuration for {@link S3SessionFactory}.

common/spring-config-common/src/main/java/org/springframework/cloud/fn/common/config/ComponentCustomizer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
/**
2020
* The customizer contract to apply to beans in the application context which type is
21-
* matching to generic type of the instance of this interface.
21+
* matching to a generic type of the instance of this interface.
2222
*
2323
* @param <T> the target component (bean) type in the application context to customize.
2424
* @author Artem Bilan

common/spring-config-common/src/main/java/org/springframework/cloud/fn/common/config/SpelExpressionConverterConfiguration.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
import org.springframework.integration.config.IntegrationConverter;
3434
import org.springframework.integration.context.IntegrationContextUtils;
3535
import org.springframework.integration.expression.SpelPropertyAccessorRegistrar;
36-
import org.springframework.integration.json.JsonPropertyAccessor;
36+
import org.springframework.integration.json.JacksonPropertyAccessor;
3737

3838
/**
3939
* The auto-configuration to register a {@link SpelConverter} for configuration
@@ -51,8 +51,9 @@ public class SpelExpressionConverterConfiguration {
5151

5252
@Bean
5353
public static SpelPropertyAccessorRegistrar spelPropertyAccessorRegistrar() {
54-
return (new SpelPropertyAccessorRegistrar())
55-
.add(Introspector.decapitalize(JsonPropertyAccessor.class.getSimpleName()), new JsonPropertyAccessor());
54+
return (new SpelPropertyAccessorRegistrar()).add(
55+
Introspector.decapitalize(JacksonPropertyAccessor.class.getSimpleName()),
56+
new JacksonPropertyAccessor());
5657
}
5758

5859
@Bean
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
dependencies {
2-
api 'org.springframework.integration:spring-integration-debezium'
2+
api 'org.springframework.integration:spring-integration-debezium'
33

4-
testImplementation 'io.debezium:debezium-connector-mysql'
5-
testImplementation 'org.springframework:spring-jdbc'
6-
testImplementation 'com.zaxxer:HikariCP'
4+
testImplementation 'org.springframework.boot:spring-boot-data-mongodb'
5+
testImplementation 'org.springframework.boot:spring-boot-jdbc'
6+
testImplementation 'io.debezium:debezium-connector-mysql'
7+
testImplementation 'org.springframework:spring-jdbc'
8+
testImplementation 'com.zaxxer:HikariCP'
79
}

common/spring-debezium-autoconfigure/src/test/java/org/springframework/cloud/fn/common/debezium/DebeziumEngineBuilderAutoConfigurationIntegrationTests.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@
4141

4242
import org.springframework.boot.SpringBootConfiguration;
4343
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
44-
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
45-
import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties;
46-
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
4744
import org.springframework.boot.context.properties.ConfigurationProperties;
45+
import org.springframework.boot.jdbc.autoconfigure.DataSourceAutoConfiguration;
46+
import org.springframework.boot.jdbc.autoconfigure.DataSourceProperties;
47+
import org.springframework.boot.mongodb.autoconfigure.MongoAutoConfiguration;
4848
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
4949
import org.springframework.context.annotation.Bean;
5050
import org.springframework.context.annotation.Primary;
@@ -54,7 +54,7 @@
5454
import static org.awaitility.Awaitility.await;
5555

5656
/**
57-
* This test illustrate how to leverage the DebeziumEngineAutoConfiguration to build a
57+
* This test illustrates how to leverage the DebeziumEngineAutoConfiguration to build a
5858
* consumer function with a custom change event Consumer.
5959
*
6060
* @author Christian Tzolov

common/spring-file-common/src/main/java/org/springframework/cloud/fn/common/file/remote/RemoteFileDeletingAdvice.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@
1616

1717
package org.springframework.cloud.fn.common.file.remote;
1818

19+
import org.jspecify.annotations.Nullable;
20+
1921
import org.springframework.integration.aop.MessageSourceMutator;
2022
import org.springframework.integration.core.MessageSource;
2123
import org.springframework.integration.file.FileHeaders;
2224
import org.springframework.integration.file.remote.RemoteFileTemplate;
23-
import org.springframework.lang.Nullable;
2425
import org.springframework.messaging.Message;
2526

2627
/**
@@ -46,9 +47,8 @@ public RemoteFileDeletingAdvice(RemoteFileTemplate<?> template, String remoteFil
4647
this.remoteFileSeparator = remoteFileSeparator;
4748
}
4849

49-
@Nullable
5050
@Override
51-
public Message<?> afterReceive(@Nullable Message<?> result, MessageSource<?> source) {
51+
public @Nullable Message<?> afterReceive(@Nullable Message<?> result, MessageSource<?> source) {
5252
if (result != null) {
5353
String remoteDir = (String) result.getHeaders().get(FileHeaders.REMOTE_DIRECTORY);
5454
String remoteFile = (String) result.getHeaders().get(FileHeaders.REMOTE_FILE);

common/spring-file-common/src/main/java/org/springframework/cloud/fn/common/file/remote/RemoteFileRenamingAdvice.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@
1616

1717
package org.springframework.cloud.fn.common.file.remote;
1818

19+
import org.jspecify.annotations.Nullable;
20+
1921
import org.springframework.expression.Expression;
2022
import org.springframework.integration.aop.MessageSourceMutator;
2123
import org.springframework.integration.core.MessageSource;
2224
import org.springframework.integration.file.FileHeaders;
2325
import org.springframework.integration.file.remote.RemoteFileTemplate;
24-
import org.springframework.lang.Nullable;
2526
import org.springframework.messaging.Message;
2627

2728
/**
@@ -50,9 +51,8 @@ public RemoteFileRenamingAdvice(RemoteFileTemplate<?> template, String remoteFil
5051
this.newName = newNameExp;
5152
}
5253

53-
@Nullable
5454
@Override
55-
public Message<?> afterReceive(@Nullable Message<?> result, MessageSource<?> source) {
55+
public @Nullable Message<?> afterReceive(@Nullable Message<?> result, MessageSource<?> source) {
5656
if (result != null) {
5757
String remoteDir = (String) result.getHeaders().get(FileHeaders.REMOTE_DIRECTORY);
5858
String remoteFile = (String) result.getHeaders().get(FileHeaders.REMOTE_FILE);

0 commit comments

Comments
 (0)