You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes#555
* Update `EmbeddedKafkaContextCustomizer` to resolve property placeholders
* Update `KafkaStreamsTests` to use topic from property
* Add property resolving details to `EmbeddedKafka` javadoc and testing.adoc
* Simple polishing
Copy file name to clipboardExpand all lines: spring-kafka-test/src/main/java/org/springframework/kafka/test/context/EmbeddedKafkaContextCustomizer.java
+11-3Lines changed: 11 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
* Copyright 2017 the original author or authors.
2
+
* Copyright 2017-2018 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -19,6 +19,7 @@
19
19
importjava.io.IOException;
20
20
importjava.io.InputStream;
21
21
importjava.io.StringReader;
22
+
importjava.util.Arrays;
22
23
importjava.util.Map;
23
24
importjava.util.Properties;
24
25
@@ -40,6 +41,7 @@
40
41
*
41
42
* @author Artem Bilan
42
43
* @author Elliot Metsger
44
+
* @author Zach Olauson
43
45
*
44
46
* @since 1.3
45
47
*/
@@ -57,13 +59,19 @@ public void customizeContext(ConfigurableApplicationContext context, MergedConte
In the example above, the property placeholders `${kafka.broker.logs-dir}` and `${kafka.broker.port}` are resolved from the Spring `Environment`.
163
+
In the example above, the property placeholders `${kafka.topics.another-topic}`, `${kafka.broker.logs-dir}`, and `${kafka.broker.port}` are resolved from the Spring `Environment`.
164
164
In addition the broker properties are loaded from the `broker.properties` classpath resource specified by the `brokerPropertiesLocation`.
165
165
Property placeholders are resolved for the `brokerPropertiesLocation` URL and for any property placeholders found in the resource.
166
166
Properties defined by `brokerProperties` override properties found in `brokerPropertiesLocation`.
0 commit comments