Skip to content

Commit 534277f

Browse files
committed
GH-3065 Fix lazy initialization for Kafka streams configuration classes
Resolves #3065
1 parent af6b4ff commit 534277f

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

binders/kafka-binder/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/ExtendedBindingHandlerMappingsProviderAutoConfiguration.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018-2021 the original author or authors.
2+
* Copyright 2018-2025 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.
@@ -24,6 +24,7 @@
2424
import org.springframework.cloud.stream.config.BindingHandlerAdvise.MappingsProvider;
2525
import org.springframework.context.annotation.Bean;
2626
import org.springframework.context.annotation.Configuration;
27+
import org.springframework.context.annotation.Lazy;
2728

2829
/**
2930
* {@link EnableAutoConfiguration Auto-configuration} for extended binding metadata for Kafka Streams.
@@ -32,6 +33,7 @@
3233
* @since 3.2
3334
*/
3435
@Configuration(proxyBeanMethods = false)
36+
@Lazy(false)
3537
public class ExtendedBindingHandlerMappingsProviderAutoConfiguration {
3638

3739
@Bean

binders/kafka-binder/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/function/KafkaStreamsFunctionAutoConfiguration.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023-2023 the original author or authors.
2+
* Copyright 2023-2025 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.
@@ -16,18 +16,19 @@
1616

1717
package org.springframework.cloud.stream.binder.kafka.streams.function;
1818

19-
//import org.springframework.boot.context.properties.EnableConfigurationProperties;
2019
import org.springframework.cloud.stream.binder.kafka.streams.KafkaStreamsFunctionProcessor;
2120
import org.springframework.cloud.stream.function.StreamFunctionProperties;
2221
import org.springframework.context.annotation.Bean;
2322
import org.springframework.context.annotation.Conditional;
2423
import org.springframework.context.annotation.Configuration;
24+
import org.springframework.context.annotation.Lazy;
2525

2626
/**
2727
* @author Soby Chacko
2828
* @since 2.2.0
2929
*/
3030
@Configuration(proxyBeanMethods = false)
31+
@Lazy(false)
3132
public class KafkaStreamsFunctionAutoConfiguration {
3233

3334
@Bean

0 commit comments

Comments
 (0)