Skip to content

Commit 607627f

Browse files
committed
Adapt to deprecation in Spring Pulsar snapshots
1 parent 7937e4b commit 607627f

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-pulsar/src/main/java/smoketest/pulsar/ImperativeAppConfig.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -26,6 +26,7 @@
2626
import org.springframework.pulsar.annotation.PulsarListener;
2727
import org.springframework.pulsar.core.PulsarTemplate;
2828
import org.springframework.pulsar.core.PulsarTopic;
29+
import org.springframework.pulsar.core.PulsarTopicBuilder;
2930

3031
@Configuration(proxyBeanMethods = false)
3132
@Profile("smoketest.pulsar.imperative")
@@ -37,7 +38,7 @@ class ImperativeAppConfig {
3738

3839
@Bean
3940
PulsarTopic pulsarTestTopic() {
40-
return PulsarTopic.builder(TOPIC).numberOfPartitions(1).build();
41+
return new PulsarTopicBuilder().name(TOPIC).numberOfPartitions(1).build();
4142
}
4243

4344
@Bean

spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-pulsar/src/main/java/smoketest/pulsar/ReactiveAppConfig.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -27,6 +27,7 @@
2727
import org.springframework.context.annotation.Configuration;
2828
import org.springframework.context.annotation.Profile;
2929
import org.springframework.pulsar.core.PulsarTopic;
30+
import org.springframework.pulsar.core.PulsarTopicBuilder;
3031
import org.springframework.pulsar.reactive.config.annotation.ReactivePulsarListener;
3132
import org.springframework.pulsar.reactive.core.ReactivePulsarTemplate;
3233

@@ -40,7 +41,7 @@ class ReactiveAppConfig {
4041

4142
@Bean
4243
PulsarTopic pulsarTestTopic() {
43-
return PulsarTopic.builder(TOPIC).numberOfPartitions(1).build();
44+
return new PulsarTopicBuilder().name(TOPIC).numberOfPartitions(1).build();
4445
}
4546

4647
@Bean

0 commit comments

Comments
 (0)