Update Azure dependencies
This commit is contained in:
@@ -1,89 +1,90 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
<modelVersion>4.0.0</modelVersion>
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>spring-cloud-function-adapter-azure</artifactId>
|
<artifactId>spring-cloud-function-adapter-azure</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>spring-cloud-function-adapter-aws</name>
|
<name>spring-cloud-function-adapter-aws</name>
|
||||||
<description>Azure Function Adapter for Spring Cloud Function</description>
|
<description>Azure Function Adapter for Spring Cloud Function</description>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
<artifactId>spring-cloud-function-adapter-parent</artifactId>
|
<artifactId>spring-cloud-function-adapter-parent</artifactId>
|
||||||
<version>2.0.0.BUILD-SNAPSHOT</version>
|
<version>2.0.0.BUILD-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
<java.version>1.8</java.version>
|
<java.version>1.8</java.version>
|
||||||
<azure.functions.java.core.version>[1.0.0-beta-3,1.0.0)</azure.functions.java.core.version>
|
<azure.functions.java.core.version>1.0.0-beta-5</azure.functions.java.core.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
<artifactId>spring-cloud-function-context</artifactId>
|
<artifactId>spring-cloud-function-context</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter</artifactId>
|
<artifactId>spring-boot-starter</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.projectreactor</groupId>
|
<groupId>io.projectreactor</groupId>
|
||||||
<artifactId>reactor-core</artifactId>
|
<artifactId>reactor-core</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-test</artifactId>
|
<artifactId>spring-boot-starter-test</artifactId>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.microsoft.azure</groupId>
|
<groupId>com.microsoft.azure.functions</groupId>
|
||||||
<artifactId>azure-functions-java-core</artifactId>
|
<artifactId>azure-functions-java-library</artifactId>
|
||||||
<version>${azure.functions.java.core.version}</version>
|
<version>${azure.functions.java.core.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
<id>spring-snapshots</id>
|
<id>spring-snapshots</id>
|
||||||
<name>Spring Snapshots</name>
|
<name>Spring Snapshots</name>
|
||||||
<url>https://repo.spring.io/snapshot</url>
|
<url>https://repo.spring.io/snapshot</url>
|
||||||
<snapshots>
|
<snapshots>
|
||||||
<enabled>true</enabled>
|
<enabled>true</enabled>
|
||||||
</snapshots>
|
</snapshots>
|
||||||
</repository>
|
</repository>
|
||||||
<repository>
|
<repository>
|
||||||
<id>spring-milestones</id>
|
<id>spring-milestones</id>
|
||||||
<name>Spring Milestones</name>
|
<name>Spring Milestones</name>
|
||||||
<url>https://repo.spring.io/milestone</url>
|
<url>https://repo.spring.io/milestone</url>
|
||||||
<snapshots>
|
<snapshots>
|
||||||
<enabled>false</enabled>
|
<enabled>false</enabled>
|
||||||
</snapshots>
|
</snapshots>
|
||||||
</repository>
|
</repository>
|
||||||
</repositories>
|
</repositories>
|
||||||
<pluginRepositories>
|
<pluginRepositories>
|
||||||
<pluginRepository>
|
<pluginRepository>
|
||||||
<id>spring-snapshots</id>
|
<id>spring-snapshots</id>
|
||||||
<name>Spring Snapshots</name>
|
<name>Spring Snapshots</name>
|
||||||
<url>https://repo.spring.io/snapshot</url>
|
<url>https://repo.spring.io/snapshot</url>
|
||||||
<snapshots>
|
<snapshots>
|
||||||
<enabled>true</enabled>
|
<enabled>true</enabled>
|
||||||
</snapshots>
|
</snapshots>
|
||||||
</pluginRepository>
|
</pluginRepository>
|
||||||
<pluginRepository>
|
<pluginRepository>
|
||||||
<id>spring-milestones</id>
|
<id>spring-milestones</id>
|
||||||
<name>Spring Milestones</name>
|
<name>Spring Milestones</name>
|
||||||
<url>https://repo.spring.io/milestone</url>
|
<url>https://repo.spring.io/milestone</url>
|
||||||
<snapshots>
|
<snapshots>
|
||||||
<enabled>false</enabled>
|
<enabled>false</enabled>
|
||||||
</snapshots>
|
</snapshots>
|
||||||
</pluginRepository>
|
</pluginRepository>
|
||||||
</pluginRepositories>
|
</pluginRepositories>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.microsoft.azure.serverless.functions.ExecutionContext;
|
import com.microsoft.azure.functions.ExecutionContext;
|
||||||
|
|
||||||
import org.reactivestreams.Publisher;
|
import org.reactivestreams.Publisher;
|
||||||
|
|
||||||
@@ -41,7 +41,7 @@ public class AzureSpringBootRequestHandler<I, O> extends AzureSpringFunctionInit
|
|||||||
|
|
||||||
public O handleRequest(I foo, ExecutionContext context) {
|
public O handleRequest(I foo, ExecutionContext context) {
|
||||||
if (context != null) {
|
if (context != null) {
|
||||||
context.getLogger().fine("Handler Java HTTP trigger processed a request.");
|
context.getLogger().fine("Handler trigger processed a request.");
|
||||||
}
|
}
|
||||||
initialize(context);
|
initialize(context);
|
||||||
|
|
||||||
|
|||||||
@@ -27,11 +27,12 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
|||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import java.util.jar.Manifest;
|
import java.util.jar.Manifest;
|
||||||
|
|
||||||
import com.microsoft.azure.serverless.functions.ExecutionContext;
|
import com.microsoft.azure.functions.ExecutionContext;
|
||||||
|
|
||||||
import org.reactivestreams.Publisher;
|
import org.reactivestreams.Publisher;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.boot.WebApplicationType;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||||
import org.springframework.cloud.function.context.FunctionCatalog;
|
import org.springframework.cloud.function.context.FunctionCatalog;
|
||||||
@@ -89,7 +90,7 @@ public class AzureSpringFunctionInitializer implements Closeable {
|
|||||||
ClassUtils.overrideThreadContextClassLoader(
|
ClassUtils.overrideThreadContextClassLoader(
|
||||||
AzureSpringFunctionInitializer.class.getClassLoader());
|
AzureSpringFunctionInitializer.class.getClassLoader());
|
||||||
|
|
||||||
context = builder.web(false).run();
|
context = builder.web(WebApplicationType.NONE).run();
|
||||||
AzureSpringFunctionInitializer.context = context;
|
AzureSpringFunctionInitializer.context = context;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -107,7 +108,8 @@ public class AzureSpringFunctionInitializer implements Closeable {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Set<String> functionNames = this.catalog.getNames(Function.class);
|
Set<String> functionNames = this.catalog.getNames(Function.class);
|
||||||
this.function = this.catalog.lookup(Function.class, functionNames.iterator().next());
|
this.function = this.catalog.lookup(Function.class,
|
||||||
|
functionNames.iterator().next());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
package example;
|
package example;
|
||||||
|
|
||||||
import com.microsoft.azure.serverless.functions.ExecutionContext;
|
import com.microsoft.azure.functions.ExecutionContext;
|
||||||
|
|
||||||
import org.springframework.cloud.function.adapter.azure.AzureSpringBootRequestHandler;
|
import org.springframework.cloud.function.adapter.azure.AzureSpringBootRequestHandler;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user