package de.juplo.kafka.wordcount.splitter;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
@ImportResource("classpath:integration.xml")
public class SplitterApplication
{
+ @Autowired
+ SplitterApplicationProperties properties;
+
+
+ @Bean
+ SplitterApplicationProperties properties()
+ {
+ return properties;
+ }
+
@InboundChannelAdapter(channel = "recordings")
@Bean
KafkaMessageSource<String, String> source(
id="foo"
channel="words"
kafka-template="kafkaTemplate"
- topic-expression="${juplo.wordcount.splitter.output-topic}?:'BOOM'"
+ topic-expression="#properties.getOutputTopic()"
message-key-expression="headers['kafka_receivedMessageKey']" />
</beans>