committed by
Oleg Zhurakousky
parent
10b9e3d30d
commit
c1d472de25
@@ -29,14 +29,14 @@ public class CloudFunctionMain {
|
||||
|
||||
Start by adding the Maven plugin provided as part of the Google Functions Framework for Java.
|
||||
|
||||
[source, xml]
|
||||
[source,xml]
|
||||
----
|
||||
<plugin>
|
||||
<groupId>com.google.cloud.functions</groupId>
|
||||
<artifactId>function-maven-plugin</artifactId>
|
||||
<version>0.9.1</version>
|
||||
<configuration>
|
||||
<functionTarget>org.springframework.cloud.function.adapter.gcloud.FunctionInvoker</functionTarget>
|
||||
<functionTarget>org.springframework.cloud.function.adapter.gcp.FunctionInvoker</functionTarget>
|
||||
<port>8080</port>
|
||||
</configuration>
|
||||
</plugin>
|
||||
@@ -134,7 +134,7 @@ From the project base directory run the following command to deploy.
|
||||
|
||||
----
|
||||
gcloud alpha functions deploy function-sample-gcp \
|
||||
--entry-point org.springframework.cloud.function.adapter.gcloud.FunctionInvoker \
|
||||
--entry-point org.springframework.cloud.function.adapter.gcp.FunctionInvoker \
|
||||
--runtime java11 \
|
||||
--trigger-http \
|
||||
--source target/deploy \
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.cloud.function.adapter.gcloud;
|
||||
package org.springframework.cloud.function.adapter.gcp;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.cloud.function.adapter.gcloud;
|
||||
package org.springframework.cloud.function.adapter.gcp;
|
||||
|
||||
/**
|
||||
* An immutable implementation of the Google Cloud Function
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.cloud.function.adapter.gcloud;
|
||||
package org.springframework.cloud.function.adapter.gcp;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Function;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.cloud.function.adapter.gcloud;
|
||||
package org.springframework.cloud.function.adapter.gcp;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.BufferedWriter;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.cloud.function.adapter.gcloud;
|
||||
package org.springframework.cloud.function.adapter.gcp;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.cloud.function.adapter.gcloud.integration;
|
||||
package org.springframework.cloud.function.adapter.gcp.integration;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.function.Function;
|
||||
@@ -26,7 +26,7 @@ import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Import;
|
||||
|
||||
import static org.springframework.cloud.function.adapter.gcloud.integration.LocalServerTestSupport.verify;
|
||||
import static org.springframework.cloud.function.adapter.gcp.integration.LocalServerTestSupport.verify;
|
||||
|
||||
/**
|
||||
* Integration tests for GCF Http Functions.
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.cloud.function.adapter.gcloud.integration;
|
||||
package org.springframework.cloud.function.adapter.gcp.integration;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
@@ -38,7 +38,7 @@ import com.google.cloud.functions.invoker.runner.Invoker;
|
||||
import com.google.gson.Gson;
|
||||
|
||||
import org.springframework.boot.test.web.client.TestRestTemplate;
|
||||
import org.springframework.cloud.function.adapter.gcloud.FunctionInvoker;
|
||||
import org.springframework.cloud.function.adapter.gcp.FunctionInvoker;
|
||||
import org.springframework.http.HttpEntity;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -35,7 +35,7 @@ Run the following command from the project root to deploy.
|
||||
|
||||
----
|
||||
gcloud alpha functions deploy function-sample-gcp \
|
||||
--entry-point org.springframework.cloud.function.adapter.gcloud.FunctionInvoker \
|
||||
--entry-point org.springframework.cloud.function.adapter.gcp.FunctionInvoker \
|
||||
--runtime java11 \
|
||||
--trigger-http \
|
||||
--source target/deploy \
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<artifactId>function-maven-plugin</artifactId>
|
||||
<version>0.9.1</version>
|
||||
<configuration>
|
||||
<functionTarget>org.springframework.cloud.function.adapter.gcloud.FunctionInvoker</functionTarget>
|
||||
<functionTarget>org.springframework.cloud.function.adapter.gcp.FunctionInvoker</functionTarget>
|
||||
<port>8080</port>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
Reference in New Issue
Block a user