Skip to content

Commit ee24000

Browse files
Quentin PROUSTgaryrussell
authored andcommitted
fix outdated references to DEFAULT_STREAMS_CONFIG_BEAN_NAME
Fix existing code that show declaration of bean DEFAULT_STREAMS_CONFIG_BEAN_NAME as a `Properties` object or a `StreamsConfig` object.
1 parent 64a8a7b commit ee24000

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

spring-kafka/src/main/java/org/springframework/kafka/annotation/EnableKafkaStreams.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
* public class AppConfig {
3636
*
3737
* @Bean(name = KafkaStreamsDefaultConfiguration.DEFAULT_STREAMS_CONFIG_BEAN_NAME)
38-
* public StreamsConfig kStreamsConfigs() {
38+
* public KafkaStreamsConfiguration kStreamsConfigs() {
3939
* ...
4040
* }
4141
* // other @Bean definitions

spring-kafka/src/main/java/org/springframework/kafka/annotation/KafkaStreamsDefaultConfiguration.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ public StreamsBuilderFactoryBean defaultKafkaStreamsBuilder(
6464
else {
6565
throw new UnsatisfiedDependencyException(KafkaStreamsDefaultConfiguration.class.getName(),
6666
DEFAULT_STREAMS_BUILDER_BEAN_NAME, "streamsConfig", "There is no '" +
67-
DEFAULT_STREAMS_CONFIG_BEAN_NAME + "' Properties bean in the application context.\n" +
67+
DEFAULT_STREAMS_CONFIG_BEAN_NAME + "' " + KafkaStreamsConfiguration.class.getName() +
68+
" bean in the application context.\n" +
6869
"Consider declaring one or don't use @EnableKafkaStreams.");
6970
}
7071
}

src/reference/asciidoc/testing.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,11 +227,11 @@ public class KafkaStreamsTests {
227227
private String brokerAddresses;
228228
229229
@Bean(name = KafkaStreamsDefaultConfiguration.DEFAULT_STREAMS_CONFIG_BEAN_NAME)
230-
public StreamsConfig kStreamsConfigs() {
230+
public KafkaStreamsConfiguration kStreamsConfigs() {
231231
Map<String, Object> props = new HashMap<>();
232232
props.put(StreamsConfig.APPLICATION_ID_CONFIG, "testStreams");
233233
props.put(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG, this.brokerAddresses);
234-
return new StreamsConfig(props);
234+
return new KafkaStreamsConfiguration(props);
235235
}
236236
237237
}

0 commit comments

Comments
 (0)