WIP
authorKai Moritz <kai@juplo.de>
Thu, 30 Jun 2022 19:10:58 +0000 (21:10 +0200)
committerKai Moritz <kai@juplo.de>
Thu, 30 Jun 2022 19:34:51 +0000 (21:34 +0200)
src/main/java/de/juplo/kafka/wordcount/splitter/SplitterApplication.java
src/main/resources/integration-context.xml [deleted file]
src/main/resources/integration.xml [new file with mode: 0644]

index 8b33265..5d399f4 100644 (file)
@@ -4,6 +4,7 @@ import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ImportResource;
 import org.springframework.expression.common.LiteralExpression;
 import org.springframework.integration.annotation.ServiceActivator;
 import org.springframework.integration.channel.DirectChannel;
@@ -22,6 +23,7 @@ import org.springframework.messaging.support.ChannelInterceptor;
 @SpringBootApplication
 @EnableConfigurationProperties(SplitterApplicationProperties.class)
 @EnableIntegration
+@ImportResource("classpath:integration.xml")
 public class SplitterApplication
 {
        @Bean
diff --git a/src/main/resources/integration-context.xml b/src/main/resources/integration-context.xml
deleted file mode 100644 (file)
index f6ec728..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xmlns:int="http://www.springframework.org/schema/integration"
-    xmlns:int-kafka="http://www.springframework.org/schema/integration/kafka"
-    xsi:schemaLocation="
-        http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
-               http://www.springframework.org/schema/integration https://www.springframework.org/schema/integration/spring-integration.xsd
-        http://www.springframework.org/schema/integration/kafka http://www.springframework.org/schema/integration/kafka/spring-integration-kafka.xsd">
-
-  <int-kafka:inbound-channel-adapter id="source" consumer-factory="consumerFactory" channel="recordings"/>
-
-</beans>
diff --git a/src/main/resources/integration.xml b/src/main/resources/integration.xml
new file mode 100644 (file)
index 0000000..f6ec728
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:int="http://www.springframework.org/schema/integration"
+    xmlns:int-kafka="http://www.springframework.org/schema/integration/kafka"
+    xsi:schemaLocation="
+        http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
+               http://www.springframework.org/schema/integration https://www.springframework.org/schema/integration/spring-integration.xsd
+        http://www.springframework.org/schema/integration/kafka http://www.springframework.org/schema/integration/kafka/spring-integration-kafka.xsd">
+
+  <int-kafka:inbound-channel-adapter id="source" consumer-factory="consumerFactory" channel="recordings"/>
+
+</beans>