File tree 3 files changed +25
-1
lines changed
spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/kafka
3 files changed +25
-1
lines changed Original file line number Diff line number Diff line change 16
16
17
17
package org .springframework .boot .actuate .autoconfigure .metrics ;
18
18
19
+ import java .util .regex .Pattern ;
20
+
21
+ import org .apache .kafka .streams .StreamsBuilder ;
22
+ import org .apache .kafka .streams .kstream .KStream ;
23
+ import org .apache .kafka .streams .kstream .KTable ;
24
+ import org .apache .kafka .streams .kstream .Materialized ;
19
25
import org .junit .jupiter .api .Test ;
20
26
21
27
import org .springframework .boot .actuate .autoconfigure .metrics .test .MetricsRun ;
22
28
import org .springframework .boot .autoconfigure .AutoConfigurations ;
23
29
import org .springframework .boot .autoconfigure .kafka .KafkaAutoConfiguration ;
24
30
import org .springframework .boot .test .context .runner .ApplicationContextRunner ;
31
+ import org .springframework .context .annotation .Bean ;
25
32
import org .springframework .context .annotation .Configuration ;
26
33
import org .springframework .kafka .annotation .EnableKafkaStreams ;
27
34
import org .springframework .kafka .config .StreamsBuilderFactoryBean ;
@@ -93,6 +100,12 @@ void whenKafkaStreamsIsEnabledAndThereIsNoMeterRegistryThenListenerCustomization
93
100
@ EnableKafkaStreams
94
101
static class EnableKafkaStreamsConfiguration {
95
102
103
+ @ Bean
104
+ public KTable <?, ?> table (StreamsBuilder builder ) {
105
+ KStream <Object , Object > stream = builder .stream (Pattern .compile ("test" ));
106
+ return stream .groupByKey ().count (Materialized .as ("store" ));
107
+ }
108
+
96
109
}
97
110
98
111
}
Original file line number Diff line number Diff line change 18
18
19
19
import java .util .concurrent .CountDownLatch ;
20
20
import java .util .concurrent .TimeUnit ;
21
+ import java .util .regex .Pattern ;
21
22
22
23
import org .apache .kafka .clients .admin .NewTopic ;
23
24
import org .apache .kafka .clients .producer .Producer ;
25
+ import org .apache .kafka .streams .StreamsBuilder ;
26
+ import org .apache .kafka .streams .kstream .KStream ;
27
+ import org .apache .kafka .streams .kstream .KTable ;
28
+ import org .apache .kafka .streams .kstream .Materialized ;
24
29
import org .junit .jupiter .api .AfterEach ;
25
30
import org .junit .jupiter .api .Test ;
26
31
@@ -124,6 +129,12 @@ NewTopic adminCreated() {
124
129
@ EnableKafkaStreams
125
130
static class KafkaStreamsConfig {
126
131
132
+ @ Bean
133
+ public KTable <?, ?> table (StreamsBuilder builder ) {
134
+ KStream <Object , Object > stream = builder .stream (Pattern .compile ("test" ));
135
+ return stream .groupByKey ().count (Materialized .as ("store" ));
136
+ }
137
+
127
138
}
128
139
129
140
static class Listener {
Original file line number Diff line number Diff line change @@ -892,7 +892,7 @@ bom {
892
892
]
893
893
}
894
894
}
895
- library(" Kafka" , " 2.5 .0" ) {
895
+ library(" Kafka" , " 2.6 .0" ) {
896
896
group(" org.apache.kafka" ) {
897
897
modules = [
898
898
" connect-api" ,
You can’t perform that action at this time.
0 commit comments