|
108 | 108 | int partitions() default 2; |
109 | 109 |
|
110 | 110 | /** |
111 | | - * Topics that should be created Topics may contain property placeholders, e.g. |
| 111 | + * Topics that should be created Topics may contain property place holders, e.g. |
112 | 112 | * {@code topics = "${kafka.topic.one:topicOne}"} The topics will be created with |
113 | 113 | * {@link #partitions()} partitions; to provision other topics with other partition |
114 | 114 | * counts call the {@code addTopics(NewTopic... topics)} method on the autowired |
115 | 115 | * broker. |
| 116 | + * Place holders will only be resolved when there is a Spring test application |
| 117 | + * context present (such as when using {@code @SpringJunitConfig or @SpringRunner}. |
116 | 118 | * @return the topics to create |
117 | 119 | */ |
118 | 120 | String[] topics() default { }; |
119 | 121 |
|
120 | 122 | /** |
121 | 123 | * Properties in form {@literal key=value} that should be added to the broker config |
122 | 124 | * before runs. When used in a Spring test context, properties may contain property |
123 | | - * placeholders, e.g. {@code delete.topic.enable=${topic.delete:true}}. |
| 125 | + * place holders, e.g. {@code delete.topic.enable=${topic.delete:true}}. |
| 126 | + * Place holders will only be resolved when there is a Spring test application |
| 127 | + * context present (such as when using {@code @SpringJunitConfig or @SpringRunner}. |
124 | 128 | * @return the properties to add |
125 | 129 | * @see #brokerPropertiesLocation() |
126 | 130 | * @see org.springframework.kafka.test.EmbeddedKafkaBroker#brokerProperties(java.util.Map) |
|
131 | 135 | * Spring {@code Resource} url specifying the location of properties that should be |
132 | 136 | * added to the broker config. When used in a Spring test context, the |
133 | 137 | * {@code brokerPropertiesLocation} url and the properties themselves may contain |
134 | | - * placeholders that are resolved during initialization. Properties specified by |
| 138 | + * place holders that are resolved during initialization. Properties specified by |
135 | 139 | * {@link #brokerProperties()} will override properties found in |
136 | 140 | * {@code brokerPropertiesLocation}. |
| 141 | + * Place holders will only be resolved when there is a Spring test application |
| 142 | + * context present (such as when using {@code @SpringJunitConfig or @SpringRunner}. |
137 | 143 | * @return a {@code Resource} url specifying the location of properties to add |
138 | 144 | * @see #brokerProperties() |
139 | 145 | * @see org.springframework.kafka.test.EmbeddedKafkaBroker#brokerProperties(java.util.Map) |
|
0 commit comments