Skip to content

Commit 6608249

Browse files
committed
More deprecation warning fixes
* Remove `com.github.spotbugs` from Dependabot config as this dependency is not managed anymore * Update samples to Spring Boot `4.0.x` and Spring Functions Catalog `6.0.0-SNAPSHOT`
1 parent a92ae4a commit 6608249

14 files changed

Lines changed: 24 additions & 26 deletions

File tree

.github/dependabot.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ updates:
1919
update-types:
2020
- patch
2121
patterns:
22-
- com.github.spotbugs
2322
- io.spring.*
2423
- com.icegreen:greenmail
2524
- org.mock-server*

consumer/spring-mqtt-consumer/src/main/java/org/springframework/cloud/fn/consumer/mqtt/MqttConsumerConfiguration.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818

1919
import java.util.function.Consumer;
2020

21+
import org.jspecify.annotations.Nullable;
22+
2123
import org.springframework.beans.factory.BeanFactory;
2224
import org.springframework.beans.factory.annotation.Qualifier;
2325
import org.springframework.boot.autoconfigure.AutoConfiguration;
@@ -28,7 +30,6 @@
2830
import org.springframework.integration.mqtt.core.MqttPahoClientFactory;
2931
import org.springframework.integration.mqtt.outbound.MqttPahoMessageHandler;
3032
import org.springframework.integration.mqtt.support.DefaultPahoMessageConverter;
31-
import org.springframework.lang.Nullable;
3233
import org.springframework.messaging.Message;
3334
import org.springframework.messaging.MessageHandler;
3435

consumer/spring-rabbit-consumer/src/test/java/org/springframework/cloud/fn/consumer/rabbit/RabbitTestContainer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
import java.io.IOException;
2020

2121
import org.junit.jupiter.api.BeforeAll;
22-
import org.testcontainers.containers.RabbitMQContainer;
2322
import org.testcontainers.junit.jupiter.Testcontainers;
23+
import org.testcontainers.rabbitmq.RabbitMQContainer;
2424

2525
import org.springframework.test.context.DynamicPropertyRegistry;
2626
import org.springframework.test.context.DynamicPropertySource;

consumer/spring-websocket-consumer/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ dependencies {
22
api 'org.springframework.boot:spring-boot-starter-actuator'
33
api 'org.springframework:spring-websocket'
44
api 'io.netty:netty-all'
5+
api 'io.netty:netty-pkitesting'
56

67
testImplementation 'org.springframework.boot:spring-boot-starter-web'
78
testImplementation project(':spring-function-test-support')

consumer/spring-websocket-consumer/src/main/java/org/springframework/cloud/fn/consumer/websocket/WebsocketConsumerServer.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
import io.netty.bootstrap.ServerBootstrap;
2323
import io.netty.channel.Channel;
2424
import io.netty.channel.EventLoopGroup;
25-
import io.netty.channel.nio.NioEventLoopGroup;
25+
import io.netty.channel.MultiThreadIoEventLoopGroup;
26+
import io.netty.channel.nio.NioIoHandler;
2627
import io.netty.channel.socket.nio.NioServerSocketChannel;
2728
import io.netty.handler.logging.LogLevel;
2829
import io.netty.handler.logging.LoggingHandler;
@@ -70,8 +71,8 @@ public int getPort() {
7071

7172
@PostConstruct
7273
public void init() {
73-
this.bossGroup = new NioEventLoopGroup(this.properties.getThreads());
74-
this.workerGroup = new NioEventLoopGroup();
74+
this.bossGroup = new MultiThreadIoEventLoopGroup(this.properties.getThreads(), NioIoHandler.newFactory());
75+
this.workerGroup = new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory());
7576
}
7677

7778
@PreDestroy

consumer/spring-websocket-consumer/src/main/java/org/springframework/cloud/fn/consumer/websocket/WebsocketConsumerServerInitializer.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,14 @@
1616

1717
package org.springframework.cloud.fn.consumer.websocket;
1818

19-
import java.security.cert.CertificateException;
20-
21-
import javax.net.ssl.SSLException;
22-
2319
import io.netty.channel.ChannelInitializer;
2420
import io.netty.channel.ChannelPipeline;
2521
import io.netty.channel.socket.SocketChannel;
2622
import io.netty.handler.codec.http.HttpObjectAggregator;
2723
import io.netty.handler.codec.http.HttpServerCodec;
2824
import io.netty.handler.ssl.SslContext;
2925
import io.netty.handler.ssl.SslContextBuilder;
30-
import io.netty.handler.ssl.util.SelfSignedCertificate;
26+
import io.netty.pkitesting.CertificateBuilder;
3127

3228
import org.springframework.beans.factory.annotation.Autowired;
3329
import org.springframework.beans.factory.annotation.Value;
@@ -80,10 +76,10 @@ public void initChannel(SocketChannel ch) throws Exception {
8076
pipeline.addLast(new WebsocketConsumerServerHandler(this.traceRepository, this.properties, this.traceEnabled));
8177
}
8278

83-
private SslContext configureSslContext() throws CertificateException, SSLException {
79+
private SslContext configureSslContext() throws Exception {
8480
if (this.properties.isSsl()) {
85-
SelfSignedCertificate ssc = new SelfSignedCertificate();
86-
return SslContextBuilder.forServer(ssc.certificate(), ssc.privateKey()).build();
81+
return SslContextBuilder.forServer(new CertificateBuilder().buildSelfSigned().toKeyManagerFactory())
82+
.build();
8783
}
8884
else {
8985
return null;

samples/time-spel-log/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'java'
3-
id 'org.springframework.boot' version '3.5.10'
3+
id 'org.springframework.boot' version '4.0.2'
44
id 'io.spring.dependency-management' version '1.1.7'
55
}
66

@@ -20,8 +20,8 @@ repositories {
2020
}
2121

2222
ext {
23-
springCloudVersion = '2025.0.1'
24-
springFunctionsCatalogVersion = '5.2.0-SNAPSHOT'
23+
springCloudVersion = '2025.1.1'
24+
springFunctionsCatalogVersion = '6.0.0-SNAPSHOT'
2525
}
2626

2727
dependencyManagement {
542 Bytes
Binary file not shown.

samples/time-spel-log/gradle/wrapper/gradle-wrapper.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionSha256Sum=72f44c9f8ebcb1af43838f45ee5c4aa9c5444898b3468ab3f4af7b6076c5bc3f
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
3+
distributionSha256Sum=b266d5ff6b90eada6dc3b20cb090e3731302e553a27c5d3e4df1f0d76beaff06
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip
55
networkTimeout=10000
66
validateDistributionUrl=true
77
zipStoreBase=GRADLE_USER_HOME

samples/zip-split-rabbit-binder/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'java'
3-
id 'org.springframework.boot' version '3.5.10'
3+
id 'org.springframework.boot' version '4.0.2'
44
id 'io.spring.dependency-management' version '1.1.7'
55
}
66

@@ -20,8 +20,8 @@ repositories {
2020
}
2121

2222
ext {
23-
springCloudVersion = '2025.0.1'
24-
springFunctionsCatalogVersion = '5.2.0-SNAPSHOT'
23+
springCloudVersion = '2025.1.1'
24+
springFunctionsCatalogVersion = '6.0.0-SNAPSHOT'
2525
}
2626

2727
dependencyManagement {

0 commit comments

Comments
 (0)