Updates GcfJarLayout to write back classic loaders required for the current implementation of this project, before this change the default loaders would be used every time GcfJarLayout was invoked; also updates the pom for function-sample-gcp-http to use the latest development version of the spring cloud gcp adaptor

Fixes gh-1085
This commit is contained in:
Lauren Wiebenga
2024-06-11 08:48:51 -05:00
parent faeb0f77ad
commit abdb1ac04f
2 changed files with 3 additions and 2 deletions

View File

@@ -21,6 +21,7 @@ import java.io.IOException;
import org.springframework.boot.loader.tools.CustomLoaderLayout; import org.springframework.boot.loader.tools.CustomLoaderLayout;
import org.springframework.boot.loader.tools.Layouts; import org.springframework.boot.loader.tools.Layouts;
import org.springframework.boot.loader.tools.LoaderClassesWriter; import org.springframework.boot.loader.tools.LoaderClassesWriter;
import org.springframework.boot.loader.tools.LoaderImplementation;
import org.springframework.cloud.function.adapter.gcp.GcfJarLauncher; import org.springframework.cloud.function.adapter.gcp.GcfJarLauncher;
/** /**
@@ -46,7 +47,7 @@ public class GcfJarLayout extends Layouts.Jar implements CustomLoaderLayout {
@Override @Override
public void writeLoadedClasses(LoaderClassesWriter writer) throws IOException { public void writeLoadedClasses(LoaderClassesWriter writer) throws IOException {
writer.writeLoaderClasses(); writer.writeLoaderClasses(LoaderImplementation.CLASSIC);
String jarName = LAUNCHER_NAME.replaceAll("\\.", "/") + ".class"; String jarName = LAUNCHER_NAME.replaceAll("\\.", "/") + ".class";
writer.writeEntry( writer.writeEntry(

View File

@@ -27,7 +27,7 @@
<dependency> <dependency>
<groupId>org.springframework.cloud</groupId> <groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-function-adapter-gcp</artifactId> <artifactId>spring-cloud-function-adapter-gcp</artifactId>
<version>4.1.0-SNAPSHOT</version> <version>${spring-cloud-function.version}</version>
</dependency> </dependency>
<!-- test dependencies --> <!-- test dependencies -->