Merge branch '4.x' into main
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>io.spring.sample</groupId>
|
||||
<artifactId>function-functional-sample-aws</artifactId>
|
||||
<version>2.0.0.RELEASE</version>
|
||||
<version>4.0.0.RELEASE</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>function-functional-sample-aws</name>
|
||||
@@ -15,17 +15,20 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.6.1</version>
|
||||
<version>3.0.0-SNAPSHOT</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<wrapper.version>1.0.27.RELEASE</wrapper.version>
|
||||
<aws-lambda-events.version>3.9.0</aws-lambda-events.version>
|
||||
<<<<<<< HEAD
|
||||
<spring-cloud-function.version>3.2.2-SNAPSHOT</spring-cloud-function.version>
|
||||
=======
|
||||
<spring-cloud-function.version>4.0.0-SNAPSHOT</spring-cloud-function.version>
|
||||
>>>>>>> 4.x
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -4,7 +4,7 @@ import java.util.function.Function;
|
||||
|
||||
import org.springframework.boot.SpringBootConfiguration;
|
||||
import org.springframework.cloud.function.context.FunctionRegistration;
|
||||
import org.springframework.cloud.function.context.FunctionType;
|
||||
import org.springframework.cloud.function.context.catalog.FunctionTypeUtils;
|
||||
import org.springframework.context.ApplicationContextInitializer;
|
||||
import org.springframework.context.support.GenericApplicationContext;
|
||||
|
||||
@@ -24,7 +24,6 @@ public class FunctionConfiguration implements ApplicationContextInitializer<Gene
|
||||
public void initialize(GenericApplicationContext context) {
|
||||
Function<String, String> function = (str) -> str + str.toUpperCase();
|
||||
context.registerBean("uppercase", FunctionRegistration.class,
|
||||
() -> new FunctionRegistration<>(function).type(
|
||||
FunctionType.from(String.class).to(String.class)));
|
||||
() -> new FunctionRegistration<>(function).type(FunctionTypeUtils.functionType(String.class, String.class)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,19 +5,18 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.6.1</version>
|
||||
<version>3.0.0-SNAPSHOT</version>
|
||||
<relativePath /> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>io.spring.sample</groupId>
|
||||
<artifactId>function-sample-aws-custom-bean</artifactId>
|
||||
<version>3.0.0.RELEASE</version>
|
||||
<version>4.0.0.RELEASE</version>
|
||||
<name>AWS Custom Runtime - @Bean sample</name>
|
||||
<description>Demo project for Spring Cloud Function with custom AWS Lambda runtime using @Bean style</description>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<wrapper.version>1.0.27.RELEASE</wrapper.version>
|
||||
<spring-cloud-function.version>3.2.2-SNAPSHOT</spring-cloud-function.version>
|
||||
<spring-cloud-function.version>4.0.0-SNAPSHOT</spring-cloud-function.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
@@ -28,7 +27,7 @@
|
||||
-->
|
||||
<groupId>com.amazonaws</groupId>
|
||||
<artifactId>aws-lambda-java-events</artifactId>
|
||||
<version>2.2.6</version>
|
||||
<version>3.9.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -106,34 +105,38 @@
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>integration</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.22.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>integration-test</phase>
|
||||
<goals>
|
||||
<goal>test</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<exclude>none</exclude>
|
||||
</excludes>
|
||||
<includes>
|
||||
<include>com/example/ContainerTests.java</include>
|
||||
</includes>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>spring-snapshots</id>
|
||||
<name>Spring Snapshots</name>
|
||||
<url>https://repo.spring.io/libs-snapshot-local</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>spring-milestones</id>
|
||||
<name>Spring Milestones</name>
|
||||
<url>https://repo.spring.io/libs-milestone-local</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>spring-releases</id>
|
||||
<name>Spring Releases</name>
|
||||
<url>https://repo.spring.io/release</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>spring-snapshots</id>
|
||||
<name>Spring Snapshots</name>
|
||||
<url>https://repo.spring.io/libs-snapshot-local</url>
|
||||
</pluginRepository>
|
||||
<pluginRepository>
|
||||
<id>spring-milestones</id>
|
||||
<name>Spring Milestones</name>
|
||||
<url>https://repo.spring.io/libs-milestone-local</url>
|
||||
</pluginRepository>
|
||||
<pluginRepository>
|
||||
<id>spring-releases</id>
|
||||
<name>Spring Releases</name>
|
||||
<url>https://repo.spring.io/libs-release-local</url>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
</project>
|
||||
|
||||
@@ -5,19 +5,18 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.6.1</version>
|
||||
<version>3.0.0-SNAPSHOT</version>
|
||||
<relativePath /> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>io.spring.sample</groupId>
|
||||
<artifactId>function-sample-aws-custom</artifactId>
|
||||
<version>3.0.0.RELEASE</version>
|
||||
<version>4.0.0.RELEASE</version>
|
||||
<name>function-sample-aws-custom</name>
|
||||
<description>Demo project for Spring Cloud Function with custom AWS Lambda runtime</description>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<wrapper.version>1.0.27.RELEASE</wrapper.version>
|
||||
<spring-cloud-function.version>3.2.2-SNAPSHOT</spring-cloud-function.version>
|
||||
<spring-cloud-function.version>4.0.0-SNAPSHOT</spring-cloud-function.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
@@ -33,6 +32,14 @@
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.servlet</groupId>
|
||||
<artifactId>jakarta.servlet-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
>>>>>>> 4.x
|
||||
</dependency>
|
||||
<!-- <dependency> -->
|
||||
<!-- <groupId>org.springframework</groupId> -->
|
||||
@@ -43,30 +50,11 @@
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<!-- <dependency> -->
|
||||
<!-- <groupId>io.projectreactor</groupId> -->
|
||||
<!-- <artifactId>reactor-test</artifactId> -->
|
||||
<!-- <scope>test</scope> -->
|
||||
<!-- </dependency> -->
|
||||
<!-- <dependency> -->
|
||||
<!-- <groupId>org.awaitility</groupId> -->
|
||||
<!-- <artifactId>awaitility</artifactId> -->
|
||||
<!-- <scope>test</scope> -->
|
||||
<!-- </dependency> -->
|
||||
<!-- <dependency> -->
|
||||
<!-- <groupId>org.testcontainers</groupId> -->
|
||||
<!-- <artifactId>testcontainers</artifactId> -->
|
||||
<!-- <version>1.14.3</version> -->
|
||||
<!-- <scope>test</scope> -->
|
||||
<!-- </dependency> -->
|
||||
</dependencies>
|
||||
|
||||
<dependencyManagement>
|
||||
@@ -167,28 +155,16 @@
|
||||
<id>spring-snapshots</id>
|
||||
<name>Spring Snapshots</name>
|
||||
<url>https://repo.spring.io/libs-snapshot-local</url>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
<releases>
|
||||
<enabled>false</enabled>
|
||||
</releases>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>spring-milestones</id>
|
||||
<name>Spring Milestones</name>
|
||||
<url>https://repo.spring.io/libs-milestone-local</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>spring-releases</id>
|
||||
<name>Spring Releases</name>
|
||||
<url>https://repo.spring.io/release</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
</repositories>
|
||||
<pluginRepositories>
|
||||
|
||||
@@ -7,8 +7,8 @@ import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.function.context.FunctionRegistration;
|
||||
import org.springframework.cloud.function.context.FunctionType;
|
||||
import org.springframework.cloud.function.context.FunctionalSpringApplication;
|
||||
import org.springframework.cloud.function.context.catalog.FunctionTypeUtils;
|
||||
import org.springframework.context.ApplicationContextInitializer;
|
||||
import org.springframework.context.support.GenericApplicationContext;
|
||||
|
||||
@@ -32,7 +32,6 @@ public class LambdaApplication
|
||||
@Override
|
||||
public void initialize(GenericApplicationContext context) {
|
||||
context.registerBean("uppercase", FunctionRegistration.class,
|
||||
() -> new FunctionRegistration<>(uppercase()).type(
|
||||
FunctionType.from(String.class).to(String.class)));
|
||||
() -> new FunctionRegistration<>(uppercase()).type(FunctionTypeUtils.functionType(String.class, String.class)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>io.spring.sample</groupId>
|
||||
<artifactId>function-sample-aws-routing</artifactId>
|
||||
<version>2.0.0.RELEASE</version>
|
||||
<version>4.0.0.RELEASE</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>function-sample-aws-routing</name>
|
||||
@@ -15,17 +15,16 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.6.1</version>
|
||||
<version>3.0.0-SNAPSHOT</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<wrapper.version>1.0.27.RELEASE</wrapper.version>
|
||||
<aws-lambda-events.version>2.0.2</aws-lambda-events.version>
|
||||
<spring-cloud-function.version>3.2.2-SNAPSHOT</spring-cloud-function.version>
|
||||
<spring-cloud-function.version>4.0.0-SNAPSHOT</spring-cloud-function.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>io.spring.sample</groupId>
|
||||
<artifactId>function-sample-aws</artifactId>
|
||||
<version>2.0.0.RELEASE</version>
|
||||
<version>4.0.0.RELEASE</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>function-sample-aws</name>
|
||||
@@ -15,17 +15,16 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.6.1</version>
|
||||
<version>3.0.0-SNAPSHOT</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<wrapper.version>1.0.27.RELEASE</wrapper.version>
|
||||
<aws-lambda-events.version>3.9.0</aws-lambda-events.version>
|
||||
<spring-cloud-function.version>3.2.2-SNAPSHOT</spring-cloud-function.version>
|
||||
<spring-cloud-function.version>4.0.0-SNAPSHOT</spring-cloud-function.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>io.spring.sample</groupId>
|
||||
<artifactId>function-sample-azure</artifactId>
|
||||
<version>2.0.0.RELEASE</version>
|
||||
<version>4.0.0.RELEASE</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>function-sample-azure</name>
|
||||
@@ -14,12 +14,11 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.6.1</version>
|
||||
<version>3.0.0-SNAPSHOT</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<functionAppName>function-sample-azure</functionAppName>
|
||||
<functionAppRegion>westus</functionAppRegion>
|
||||
<functionResourceGroup>java-function-group</functionResourceGroup>
|
||||
@@ -54,7 +53,7 @@
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-function-dependencies</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>4.0.0-SNAPSHOT</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
/*
|
||||
* Copyright 2012-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package example;
|
||||
|
||||
import com.microsoft.azure.functions.ExecutionContext;
|
||||
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import java.util.logging.Logger;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
import org.springframework.cloud.function.adapter.azure.AzureSpringBootRequestHandler;
|
||||
|
||||
/**
|
||||
* @author Dave Syer
|
||||
*
|
||||
*/
|
||||
public class MapTests {
|
||||
|
||||
@Test
|
||||
public void start() throws Exception {
|
||||
AzureSpringBootRequestHandler<String, String> handler = new AzureSpringBootRequestHandler<>(
|
||||
Config.class);
|
||||
ExecutionContext ec = new ExecutionContext() {
|
||||
@Override
|
||||
public Logger getLogger() {
|
||||
return Logger.getAnonymousLogger();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInvocationId() {
|
||||
return "id1";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFunctionName() {
|
||||
return "uppercase";
|
||||
}
|
||||
};
|
||||
|
||||
String result = handler.handleRequest("{\"greeting\": \"hello\",\"name\": \"your_name\"}", ec);
|
||||
handler.close();
|
||||
assertThat(result).isEqualTo("{\"greeting\":\"HELLO\",\"name\":\"YOUR_NAME\"}");
|
||||
}
|
||||
}
|
||||
@@ -12,13 +12,12 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.6.1</version>
|
||||
<version>3.0.0-SNAPSHOT</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<spring-cloud-function.version>3.2.2-SNAPSHOT</spring-cloud-function.version>
|
||||
<spring-cloud-function.version>4.0.0-SNAPSHOT</spring-cloud-function.version>
|
||||
<wrapper.version>1.0.27.RELEASE</wrapper.version>
|
||||
</properties>
|
||||
|
||||
@@ -28,7 +27,6 @@
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-function-rsocket</artifactId>
|
||||
<version>3.1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<!-- end RSocket -->
|
||||
|
||||
@@ -37,7 +35,7 @@
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-stream-binder-kafka</artifactId>
|
||||
<version>3.1.0-SNAPSHOT</version>
|
||||
<version>4.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<!-- end Kafka -->
|
||||
<dependency>
|
||||
|
||||
@@ -4,20 +4,19 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>io.spring.sample</groupId>
|
||||
<artifactId>function-sample-cloudevent-stream</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<version>4.0.0-RELEASE</version>
|
||||
<name>function-sample-cloudevent-stream</name>
|
||||
<description>Demo project for Spring Boot</description>
|
||||
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.6.1</version>
|
||||
<version>3.0.0-SNAPSHOT</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<spring-cloud-function.version>3.2.2-SNAPSHOT</spring-cloud-function.version>
|
||||
<spring-cloud-function.version>4.0.0-SNAPSHOT</spring-cloud-function.version>
|
||||
<wrapper.version>1.0.27.RELEASE</wrapper.version>
|
||||
</properties>
|
||||
|
||||
@@ -29,13 +28,13 @@
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-stream</artifactId>
|
||||
<version>3.2.0-M2</version>
|
||||
<version>4.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<!-- RabbitMQ - only needed if you intend to invoke via RabbitMQ -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-stream-binder-rabbit</artifactId>
|
||||
<version>3.2.0-M2</version>
|
||||
<version>4.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<!-- end RabbitMQ -->
|
||||
|
||||
@@ -43,7 +42,7 @@
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-stream-binder-kafka</artifactId>
|
||||
<version>3.2.0-M2</version>
|
||||
<version>4.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<!-- end Kafka -->
|
||||
<dependency>
|
||||
|
||||
@@ -11,13 +11,12 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.6.1</version>
|
||||
<version>3.0.0-SNAPSHOT</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<spring-cloud-function.version>3.2.2-SNAPSHOT</spring-cloud-function.version>
|
||||
<spring-cloud-function.version>4.0.0-SNAPSHOT</spring-cloud-function.version>
|
||||
<wrapper.version>1.0.27.RELEASE</wrapper.version>
|
||||
</properties>
|
||||
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<spring-cloud-function.version>3.2.2-SNAPSHOT</spring-cloud-function.version>
|
||||
<spring-cloud-function.version>4.0.0-SNAPSHOT</spring-cloud-function.version>
|
||||
<reactor.version>3.1.2.RELEASE</reactor.version>
|
||||
<wrapper.version>1.0.17.RELEASE</wrapper.version>
|
||||
</properties>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>io.spring.sample</groupId>
|
||||
<artifactId>function-sample-functional-aws-routing</artifactId>
|
||||
<version>2.0.0.RELEASE</version>
|
||||
<version>4.0.0.RELEASE</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>function-sample-functional-aws-routing</name>
|
||||
@@ -15,17 +15,16 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.6.1</version>
|
||||
<version>3.0.0-SNAPSHOT</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<wrapper.version>1.0.27.RELEASE</wrapper.version>
|
||||
<aws-lambda-events.version>2.0.2</aws-lambda-events.version>
|
||||
<spring-cloud-function.version>3.2.2-SNAPSHOT</spring-cloud-function.version>
|
||||
<spring-cloud-function.version>4.0.0-SNAPSHOT</spring-cloud-function.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<groupId>io.spring.sample</groupId>
|
||||
<artifactId>function-sample-gcp-background</artifactId>
|
||||
<version>2.0.0.RELEASE</version>
|
||||
<version>4.0.0.RELEASE</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>function-sample-gcp-background</name>
|
||||
@@ -15,7 +15,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.6.1</version>
|
||||
<version>3.0.0-SNAPSHOT</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-function-adapter-gcp</artifactId>
|
||||
<version>3.1.0-SNAPSHOT</version>
|
||||
<version>4.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<groupId>io.spring.sample</groupId>
|
||||
<artifactId>function-sample-gcp-http</artifactId>
|
||||
<version>2.0.0.RELEASE</version>
|
||||
<version>4.0.0.RELEASE</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>function-sample-gcp-http</name>
|
||||
@@ -15,7 +15,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.6.1</version>
|
||||
<version>3.0.0-SNAPSHOT</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-function-adapter-gcp</artifactId>
|
||||
<version>${spring-cloud-function.version}</version>
|
||||
<version>4.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- test dependencies -->
|
||||
@@ -63,7 +63,6 @@
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<version>2.8.2</version>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
|
||||
@@ -7,17 +7,16 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.6.1</version>
|
||||
<version>3.0.0-SNAPSHOT</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
<groupId>com.example.grpc</groupId>
|
||||
<artifactId>function-sample-grpc-cloudevent</artifactId>
|
||||
<version>0.0.1-RELEASE</version>
|
||||
<version>4.0.0-RELEASE</version>
|
||||
<name>function-sample-grpc-cloudevent</name>
|
||||
<description>Demo project for Spring Boot</description>
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<spring-cloud-function.version>3.2.2-SNAPSHOT</spring-cloud-function.version>
|
||||
<spring-cloud-function.version>4.0.0-SNAPSHOT</spring-cloud-function.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
||||
@@ -4,22 +4,17 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>io.spring.sample</groupId>
|
||||
<artifactId>function-sample-kotlin-web</artifactId>
|
||||
<version>1.0</version>
|
||||
<version>4.0.0</version>
|
||||
<name>function-sample-kotlin-web</name>
|
||||
<description>Demo project for Spring Cloud Function Web Kotlin integration</description>
|
||||
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.6.1</version>
|
||||
<version>3.0.0-SNAPSHOT</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<kotlin.version>1.4.21</kotlin.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
@@ -28,27 +23,25 @@
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-reflect</artifactId>
|
||||
<version>1.6.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-stdlib-jdk8</artifactId>
|
||||
<version>1.6.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-function-kotlin</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>4.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-function-web</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>4.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-function-context</artifactId>
|
||||
<version>3.2.1-SNAPSHOT</version>
|
||||
<version>4.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
@@ -79,7 +72,6 @@
|
||||
<plugin>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-maven-plugin</artifactId>
|
||||
<version>1.6.0</version>
|
||||
<configuration>
|
||||
<args>
|
||||
<arg>-Xjsr305=strict</arg>
|
||||
@@ -92,11 +84,46 @@
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-maven-allopen</artifactId>
|
||||
<version>${kotlin.version}</version>
|
||||
<version>1.4.21</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>spring-snapshots</id>
|
||||
<name>Spring Snapshots</name>
|
||||
<url>https://repo.spring.io/libs-snapshot-local</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>spring-milestones</id>
|
||||
<name>Spring Milestones</name>
|
||||
<url>https://repo.spring.io/libs-milestone-local</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>spring-releases</id>
|
||||
<name>Spring Releases</name>
|
||||
<url>https://repo.spring.io/release</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>spring-snapshots</id>
|
||||
<name>Spring Snapshots</name>
|
||||
<url>https://repo.spring.io/libs-snapshot-local</url>
|
||||
</pluginRepository>
|
||||
<pluginRepository>
|
||||
<id>spring-milestones</id>
|
||||
<name>Spring Milestones</name>
|
||||
<url>https://repo.spring.io/libs-milestone-local</url>
|
||||
</pluginRepository>
|
||||
<pluginRepository>
|
||||
<id>spring-releases</id>
|
||||
<name>Spring Releases</name>
|
||||
<url>https://repo.spring.io/libs-release-local</url>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
|
||||
</project>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
<groupId>io.spring.sample</groupId>
|
||||
<artifactId>function-sample-pof</artifactId>
|
||||
<version>2.0.0.RELEASE</version>
|
||||
<version>4.0.0.RELEASE</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>function-sample-pof</name>
|
||||
<description>Spring Cloud Function Web Support</description>
|
||||
@@ -13,16 +13,15 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.6.1</version>
|
||||
<version>3.0.0-SNAPSHOT</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<reactor.version>3.1.2.RELEASE</reactor.version>
|
||||
<spring-cloud-function.version>3.2.2-SNAPSHOT</spring-cloud-function.version>
|
||||
<spring-cloud-function.version>4.0.0-SNAPSHOT</spring-cloud-function.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>io.spring.sample</groupId>
|
||||
<artifactId>function-sample-pojo</artifactId>
|
||||
<version>2.0.0.RELEASE</version>
|
||||
<version>4.0.0.RELEASE</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>function-sample-pojo</name>
|
||||
<description>Spring Cloud Function Web Support</description>
|
||||
@@ -14,13 +14,12 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.6.1</version>
|
||||
<version>3.0.0-SNAPSHOT</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<spring-cloud-function.version>3.2.2-SNAPSHOT</spring-cloud-function.version>
|
||||
<spring-cloud-function.version>4.0.0-SNAPSHOT</spring-cloud-function.version>
|
||||
<wrapper.version>1.0.27.RELEASE</wrapper.version>
|
||||
</properties>
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<spring-cloud-function.version>3.2.2-SNAPSHOT</spring-cloud-function.version>
|
||||
<spring-cloud-function.version>4.0.0-SNAPSHOT</spring-cloud-function.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>io.spring.sample</groupId>
|
||||
<artifactId>function-sample-aws-supplier-exporter</artifactId>
|
||||
<version>2.0.0.RELEASE</version>
|
||||
<version>4.0.0.RELEASE</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>function-sample-aws-supplier-exporter</name>
|
||||
<description>Spring Cloud Function Example showing Supplier Exporter</description>
|
||||
@@ -14,13 +14,12 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.6.1</version>
|
||||
<version>3.0.0-SNAPSHOT</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<spring-cloud-function.version>3.2.2-SNAPSHOT</spring-cloud-function.version>
|
||||
<spring-cloud-function.version>4.0.0-SNAPSHOT</spring-cloud-function.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
@@ -119,4 +118,38 @@
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>spring-snapshots</id>
|
||||
<name>Spring Snapshots</name>
|
||||
<url>https://repo.spring.io/libs-snapshot-local</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>spring-milestones</id>
|
||||
<name>Spring Milestones</name>
|
||||
<url>https://repo.spring.io/libs-milestone-local</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>spring-releases</id>
|
||||
<name>Spring Releases</name>
|
||||
<url>https://repo.spring.io/release</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>spring-snapshots</id>
|
||||
<name>Spring Snapshots</name>
|
||||
<url>https://repo.spring.io/libs-snapshot-local</url>
|
||||
</pluginRepository>
|
||||
<pluginRepository>
|
||||
<id>spring-milestones</id>
|
||||
<name>Spring Milestones</name>
|
||||
<url>https://repo.spring.io/libs-milestone-local</url>
|
||||
</pluginRepository>
|
||||
<pluginRepository>
|
||||
<id>spring-releases</id>
|
||||
<name>Spring Releases</name>
|
||||
<url>https://repo.spring.io/libs-release-local</url>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
</project>
|
||||
|
||||
@@ -4,8 +4,8 @@ import java.util.function.Function;
|
||||
|
||||
import org.springframework.boot.SpringBootConfiguration;
|
||||
import org.springframework.cloud.function.context.FunctionRegistration;
|
||||
import org.springframework.cloud.function.context.FunctionType;
|
||||
import org.springframework.cloud.function.context.FunctionalSpringApplication;
|
||||
import org.springframework.cloud.function.context.catalog.FunctionTypeUtils;
|
||||
import org.springframework.context.ApplicationContextInitializer;
|
||||
import org.springframework.context.support.GenericApplicationContext;
|
||||
|
||||
@@ -21,7 +21,7 @@ public class DemoApplication
|
||||
public void initialize(GenericApplicationContext context) {
|
||||
context.registerBean("foobar", FunctionRegistration.class,
|
||||
() -> new FunctionRegistration<>(new Foobar())
|
||||
.type(FunctionType.from(Foo.class).to(Foo.class)));
|
||||
.type(FunctionTypeUtils.functionType(Foo.class, Foo.class)));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<spring-cloud-function.version>3.2.2-SNAPSHOT</spring-cloud-function.version>
|
||||
<spring-cloud-function.version>4.0.0-SNAPSHOT</spring-cloud-function.version>
|
||||
<wrapper.version>1.0.10.RELEASE</wrapper.version>
|
||||
<reactor.version>3.1.2.RELEASE</reactor.version>
|
||||
</properties>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>io.spring.sample</groupId>
|
||||
<artifactId>function-sample</artifactId>
|
||||
<version>2.0.0.RELEASE</version>
|
||||
<version>4.0.0.RELEASE</version>
|
||||
<packaging>jar</packaging>
|
||||
<name>function-sample</name>
|
||||
<description>Spring Cloud Function Web Support</description>
|
||||
@@ -14,13 +14,21 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<<<<<<< HEAD
|
||||
<version>2.6.1</version>
|
||||
=======
|
||||
<version>3.0.0-SNAPSHOT</version>
|
||||
>>>>>>> 4.x
|
||||
<relativePath/>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<<<<<<< HEAD
|
||||
<java.version>1.8</java.version>
|
||||
<spring-cloud-function.version>3.2.2-SNAPSHOT</spring-cloud-function.version>
|
||||
=======
|
||||
<spring-cloud-function.version>4.0.0-SNAPSHOT</spring-cloud-function.version>
|
||||
>>>>>>> 4.x
|
||||
<wrapper.version>1.0.27.RELEASE</wrapper.version>
|
||||
</properties>
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-function-parent</artifactId>
|
||||
<version>3.2.2-SNAPSHOT</version>
|
||||
<version>4.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
||||
Reference in New Issue
Block a user