Refactor function composition samples
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,2 +0,0 @@
|
||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration:\
|
||||
org.springframework.cloud.stream.app.processor.function.KotlinProcessorAutoConfiguration
|
||||
@@ -8,10 +8,10 @@
|
||||
<version>2.1.0.RELEASE</version>
|
||||
<relativePath></relativePath>
|
||||
</parent>
|
||||
<groupId>org.springframework.cloud.stream.app</groupId>
|
||||
<artifactId>http-transformer</artifactId>
|
||||
<version>2.1.0.BUILD-SNAPSHOT</version>
|
||||
<name>http-source-kafka</name>
|
||||
<groupId>io.spring.dataflow.sample</groupId>
|
||||
<artifactId>composed-http-transformer-kafka</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>composed-http-transformer-kafka</name>
|
||||
<description>Spring Cloud Stream Http Transformer Kafka Binder Application</description>
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
@@ -26,6 +26,8 @@
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
<properties>
|
||||
<docker.org>springcloudstream</docker.org>
|
||||
<docker.version>${project.version}</docker.version>
|
||||
<skipTests>true</skipTests>
|
||||
<java.version>1.8</java.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
@@ -105,6 +107,22 @@
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.google.cloud.tools</groupId>
|
||||
<artifactId>jib-maven-plugin</artifactId>
|
||||
<version>0.10.1</version>
|
||||
<configuration>
|
||||
<from>
|
||||
<image>springcloud/openjdk</image>
|
||||
</from>
|
||||
<to>
|
||||
<image>${docker.org}/${project.artifactId}:${docker.version}</image>
|
||||
</to>
|
||||
<container>
|
||||
<useCurrentTimestamp>true</useCurrentTimestamp>
|
||||
</container>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<profiles>
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.cloud.stream.app.http.source.kafka;
|
||||
package io.spring.dataflow.sample;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.springframework.context.annotation.Import;
|
||||
|
||||
@SpringBootApplication
|
||||
@Import(org.springframework.cloud.stream.app.http.source.HttpSourceConfiguration.class)
|
||||
public class HttpSourceKafkaApplication {
|
||||
public class HttpTransformerKafkaApplication {
|
||||
|
||||
@Bean
|
||||
public Function<String, String> upper() {
|
||||
@@ -40,6 +40,6 @@ public class HttpSourceKafkaApplication {
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(HttpSourceKafkaApplication.class, args);
|
||||
SpringApplication.run(HttpTransformerKafkaApplication.class, args);
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.cloud.stream.app.http.source.kafka;
|
||||
package io.spring.dataflow.sample;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
@@ -23,7 +23,7 @@ import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
public class HttpSourceKafkaApplicationTests {
|
||||
public class HttpTransformerKafkaApplicationTests {
|
||||
|
||||
@Test
|
||||
public void contextLoads() {
|
||||
@@ -8,10 +8,10 @@
|
||||
<version>2.1.0.RELEASE</version>
|
||||
<relativePath></relativePath>
|
||||
</parent>
|
||||
<groupId>org.springframework.cloud.stream.app</groupId>
|
||||
<artifactId>http-transformer-kotlin</artifactId>
|
||||
<version>2.1.0.BUILD-SNAPSHOT</version>
|
||||
<name>http-source-kafka</name>
|
||||
<groupId>io.spring.dataflow.sample</groupId>
|
||||
<artifactId>composed-http-transformer-kotlin-kafka</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>composed-http-transformer-kotlin-kafka</name>
|
||||
<description>Spring Cloud Stream Http Transformer Kotlin Processor with Kafka Binder Application</description>
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
@@ -26,6 +26,8 @@
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
<properties>
|
||||
<docker.org>springcloudstream</docker.org>
|
||||
<docker.version>${project.version}</docker.version>
|
||||
<skipTests>true</skipTests>
|
||||
<java.version>1.8</java.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
@@ -115,6 +117,22 @@
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.google.cloud.tools</groupId>
|
||||
<artifactId>jib-maven-plugin</artifactId>
|
||||
<version>0.10.1</version>
|
||||
<configuration>
|
||||
<from>
|
||||
<image>springcloud/openjdk</image>
|
||||
</from>
|
||||
<to>
|
||||
<image>${docker.org}/${project.artifactId}:${docker.version}</image>
|
||||
</to>
|
||||
<container>
|
||||
<useCurrentTimestamp>true</useCurrentTimestamp>
|
||||
</container>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>kotlin-maven-plugin</artifactId>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.cloud.stream.app.http.source.kafka;
|
||||
package io.spring.dataflow.sample;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
@@ -27,8 +27,8 @@ import org.springframework.context.annotation.Import;
|
||||
|
||||
@SpringBootApplication
|
||||
@Import({org.springframework.cloud.stream.app.http.source.HttpSourceConfiguration.class,
|
||||
HttpSourceKafkaApplication.FunctionProcessorConfiguration.class})
|
||||
public class HttpSourceKafkaApplication {
|
||||
HttpTransformerKotlinKafkaApplication.FunctionProcessorConfiguration.class})
|
||||
public class HttpTransformerKotlinKafkaApplication {
|
||||
|
||||
@Configuration
|
||||
public static class FunctionProcessorConfiguration {
|
||||
@@ -45,6 +45,6 @@ public class HttpSourceKafkaApplication {
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(HttpSourceKafkaApplication.class, args);
|
||||
SpringApplication.run(HttpTransformerKotlinKafkaApplication.class, args);
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.cloud.stream.app.processor.function
|
||||
package io.spring.dataflow.sample
|
||||
|
||||
import org.springframework.context.annotation.Bean
|
||||
import org.springframework.context.annotation.Configuration
|
||||
@@ -0,0 +1,2 @@
|
||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration:\
|
||||
io.spring.dataflow.sample.KotlinProcessorAutoConfiguration
|
||||
@@ -23,7 +23,7 @@ import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
public class HttpSourceKafkaApplicationTests {
|
||||
public class HttpTransformerKotlinKafkaApplicationTests {
|
||||
|
||||
@Test
|
||||
public void contextLoads() {
|
||||
@@ -8,10 +8,10 @@
|
||||
<version>2.1.0.RELEASE</version>
|
||||
<relativePath></relativePath>
|
||||
</parent>
|
||||
<groupId>org.springframework.cloud.stream.app</groupId>
|
||||
<artifactId>http-transformer-kotlin</artifactId>
|
||||
<version>2.1.0.BUILD-SNAPSHOT</version>
|
||||
<name>http-source-rabbit</name>
|
||||
<groupId>io.spring.dataflow.sample</groupId>
|
||||
<artifactId>composed-http-transformer-kotlin-rabbitmq</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>http-transformer-kotlin-rabbitmq</name>
|
||||
<description>Spring Cloud Stream Http Transformer Kotlin Processor with Rabbit Binder Application</description>
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
@@ -26,6 +26,8 @@
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
<properties>
|
||||
<docker.org>springcloudstream</docker.org>
|
||||
<docker.version>${project.version}</docker.version>
|
||||
<skipTests>true</skipTests>
|
||||
<java.version>1.8</java.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
@@ -115,6 +117,22 @@
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.google.cloud.tools</groupId>
|
||||
<artifactId>jib-maven-plugin</artifactId>
|
||||
<version>0.10.1</version>
|
||||
<configuration>
|
||||
<from>
|
||||
<image>springcloud/openjdk</image>
|
||||
</from>
|
||||
<to>
|
||||
<image>${docker.org}/${project.artifactId}:${docker.version}</image>
|
||||
</to>
|
||||
<container>
|
||||
<useCurrentTimestamp>true</useCurrentTimestamp>
|
||||
</container>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>kotlin-maven-plugin</artifactId>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
@@ -8,10 +8,10 @@
|
||||
<version>2.1.0.RELEASE</version>
|
||||
<relativePath></relativePath>
|
||||
</parent>
|
||||
<groupId>org.springframework.cloud.stream.app</groupId>
|
||||
<artifactId>http-transformer</artifactId>
|
||||
<version>2.1.0.BUILD-SNAPSHOT</version>
|
||||
<name>http-source-rabbit</name>
|
||||
<groupId>io.spring.dataflow.sample</groupId>
|
||||
<artifactId>composed-http-transformer-rabbitmq</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>composed-http-transformer-rabbitmq</name>
|
||||
<description>Spring Cloud Stream Http Transformer Rabbit Binder Application</description>
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
@@ -26,6 +26,8 @@
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
<properties>
|
||||
<docker.org>springcloudstream</docker.org>
|
||||
<docker.version>${project.version}</docker.version>
|
||||
<skipTests>true</skipTests>
|
||||
<java.version>1.8</java.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
@@ -105,6 +107,22 @@
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.google.cloud.tools</groupId>
|
||||
<artifactId>jib-maven-plugin</artifactId>
|
||||
<version>0.10.1</version>
|
||||
<configuration>
|
||||
<from>
|
||||
<image>springcloud/openjdk</image>
|
||||
</from>
|
||||
<to>
|
||||
<image>${docker.org}/${project.artifactId}:${docker.version}</image>
|
||||
</to>
|
||||
<container>
|
||||
<useCurrentTimestamp>true</useCurrentTimestamp>
|
||||
</container>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<profiles>
|
||||
Reference in New Issue
Block a user