File tree Expand file tree Collapse file tree 4 files changed +16
-18
lines changed
src/main/java/com/google/cloud/spanner/pgadapter/sample Expand file tree Collapse file tree 4 files changed +16
-18
lines changed Original file line number Diff line number Diff line change 1313# limitations under the License.
1414
1515# Use the official maven/Java image to create a build artifact.
16- FROM maven:3.8-jdk-11 as builder
16+ FROM maven:3.9.4-eclipse-temurin-17 as builder
1717
1818# Copy local code to the container image.
1919WORKDIR /app
@@ -24,7 +24,7 @@ COPY src ./src
2424RUN mvn package -DskipTests
2525
2626# Use AdoptOpenJDK for base image.
27- FROM adoptopenjdk/openjdk11:alpine -jre
27+ FROM eclipse-temurin:17 -jre-alpine
2828
2929# Copy the jar to the production image from the builder stage.
3030COPY --from=builder /app/target/google-cloud-spanner-pgadapter-samples-cloud-run-*.jar /google-cloud-spanner-pgadapter-samples-cloud-run.jar
Original file line number Diff line number Diff line change 11# PGAdapter Cloud Run Sample for Java
22
3- This sample application shows how to build and deploy a Java application with PGAdapter to Google Cloud Run.
3+ This sample application shows how to build and deploy a Java application with PGAdapter to Google
4+ Cloud Run. This sample runs PGAdapter as an in-process dependency with the Java application. You
5+ can also [ run PGAdapter as a side-car container] ( ../../cloud-run/java ) .
46
57The sample is based on the [ Cloud Run Quickstart Guide for Java] ( https://cloud.google.com/run/docs/quickstarts/build-and-deploy/deploy-java-service ) .
68Refer to that guide for more in-depth information on how to work with Cloud Run.
Original file line number Diff line number Diff line change 1515 xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
1616 xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
1717 <properties >
18- <java .version>1.8</java .version>
19- <maven .compiler.source>1.8</maven .compiler.source>
20- <maven .compiler.target>1.8</maven .compiler.target>
21- <project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
22- <project .reporting.outputEncoding>UTF-8</project .reporting.outputEncoding>
23-
24- <spring-boot .version>2.7.11</spring-boot .version>
18+ <maven .compiler.source>17</maven .compiler.source>
19+ <maven .compiler.target>17</maven .compiler.target>
20+ <java .version>17</java .version>
2521 <junixsocket .version>2.7.0</junixsocket .version>
2622 </properties >
2723
4036 <dependency >
4137 <groupId >org.springframework.boot</groupId >
4238 <artifactId >spring-boot-dependencies</artifactId >
43- <version >${spring-boot.version} </version >
39+ <version >3.1.3 </version >
4440 <type >pom</type >
4541 <scope >import</scope >
4642 </dependency >
8985 <plugin >
9086 <groupId >org.springframework.boot</groupId >
9187 <artifactId >spring-boot-maven-plugin</artifactId >
92- <version >${spring-boot.version} </version >
9388 <executions >
9489 <execution >
9590 <goals >
109104 </configuration >
110105 </plugin >
111106 <plugin >
112- <groupId >com.coveo </groupId >
107+ <groupId >com.spotify.fmt </groupId >
113108 <artifactId >fmt-maven-plugin</artifactId >
114- <version >2.13 </version >
109+ <version >2.20 </version >
115110 <executions >
116111 <execution >
117112 <goals >
Original file line number Diff line number Diff line change @@ -56,10 +56,11 @@ public String getConnectionUrl() {
5656 * @param instance the Cloud Spanner instance that PGAdapter should connect to
5757 */
5858 static ProxyServer startPGAdapter (String project , String instance ) {
59- OptionsMetadata options = OptionsMetadata .newBuilder ()
60- .setProject (project )
61- .setInstance (instance )
62- .build ();
59+ OptionsMetadata options =
60+ OptionsMetadata .newBuilder ()
61+ .setProject (project )
62+ .setInstance (instance )
63+ .build ();
6364 ProxyServer server = new ProxyServer (options );
6465 server .startServer ();
6566 server .awaitRunning ();
You can’t perform that action at this time.
0 commit comments