Skip to content

Commit

Permalink
#45 add new resource.
Browse files Browse the repository at this point in the history
  • Loading branch information
tanakaryo authored and tanakaryo committed Feb 3, 2024
1 parent 95c578f commit d900e96
Show file tree
Hide file tree
Showing 24 changed files with 164 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"java.configuration.updateBuildConfiguration": "interactive"
}
81 changes: 81 additions & 0 deletions services/cloud-run/java/prj1/cloudruntest/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>cloudruntest</groupId>
<artifactId>cloudruntest</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>cloudruntest</name>
<url>http://maven.apache.org</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.target>17</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
<spring-boot.version>3.2.1</spring-boot.version>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<!-- Import dependency management from Spring Boot -->
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring-boot.version}</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>3.4.0</version>
<configuration>
<to>
<image>gcr.io/dataflowtest002/helloworld</image>
</to>
</configuration>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package cloudruntest;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.GetMapping;

@SpringBootApplication
public class App {
@Value("${NAME:world}")
String name;

/**
*
* GreetingController
*/
@RestController
public class GreetingController {


@GetMapping("/")
public String greeting() {
return new StringBuilder().append("Guten ").append(name).toString();
}

}

public static void main( String[] args ) {
SpringApplication.run(App.class, args);
}
}
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package cloudruntest;

import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;

/**
* Unit test for simple App.
*/
public class AppTest
extends TestCase
{
/**
* Create the test case
*
* @param testName name of the test case
*/
public AppTest( String testName )
{
super( testName );
}

/**
* @return the suite of tests being tested
*/
public static Test suite()
{
return new TestSuite( AppTest.class );
}

/**
* Rigourous Test :-)
*/
public void testApp()
{
assertTrue( true );
}
}
Empty file.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/app/resources:/app/classes:/app/libs/spring-boot-starter-web-3.2.1.jar:/app/libs/spring-boot-starter-3.2.1.jar:/app/libs/spring-boot-3.2.1.jar:/app/libs/spring-boot-autoconfigure-3.2.1.jar:/app/libs/spring-boot-starter-logging-3.2.1.jar:/app/libs/logback-classic-1.4.14.jar:/app/libs/logback-core-1.4.14.jar:/app/libs/log4j-to-slf4j-2.21.1.jar:/app/libs/log4j-api-2.21.1.jar:/app/libs/jul-to-slf4j-2.0.9.jar:/app/libs/jakarta.annotation-api-2.1.1.jar:/app/libs/snakeyaml-2.2.jar:/app/libs/spring-boot-starter-json-3.2.1.jar:/app/libs/jackson-databind-2.15.3.jar:/app/libs/jackson-annotations-2.15.3.jar:/app/libs/jackson-core-2.15.3.jar:/app/libs/jackson-datatype-jdk8-2.15.3.jar:/app/libs/jackson-datatype-jsr310-2.15.3.jar:/app/libs/jackson-module-parameter-names-2.15.3.jar:/app/libs/spring-boot-starter-tomcat-3.2.1.jar:/app/libs/tomcat-embed-core-10.1.17.jar:/app/libs/tomcat-embed-el-10.1.17.jar:/app/libs/tomcat-embed-websocket-10.1.17.jar:/app/libs/spring-web-6.1.2.jar:/app/libs/spring-beans-6.1.2.jar:/app/libs/micrometer-observation-1.12.1.jar:/app/libs/micrometer-commons-1.12.1.jar:/app/libs/spring-webmvc-6.1.2.jar:/app/libs/spring-aop-6.1.2.jar:/app/libs/spring-context-6.1.2.jar:/app/libs/spring-expression-6.1.2.jar:/app/libs/slf4j-api-2.0.9.jar:/app/libs/spring-core-6.1.2.jar:/app/libs/spring-jcl-6.1.2.jar
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cloudruntest.App
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
b58a60bfe43ce04c5e625ed831d69a7ea68bb311135c6847f2fda50b390691c5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9c45675c71645b8fbcfcba2dfbedd35d790f487b27ce7e2a4f3298da24c7fb82
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
408d7f7ba5a4f1eaa2a40a7c422de3f147d3db0fcae9deca5370d007568c6dbc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
26e440f9aac63d933bc2024064875753dc1925f466677d1bcad934845e4ad57a
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sha256:90ae868c3336df3920abf1fa6480a14152b7bd63834440a8bbb19dfaf63f1656
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sha256:e5f2766c1f53ec2a6d9849a224519ec3d9a2a4fa74f216e9807fcfeb79775d6c
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"image":"gcr.io/dataflowtest002/helloworld","imageId":"sha256:e5f2766c1f53ec2a6d9849a224519ec3d9a2a4fa74f216e9807fcfeb79775d6c","imageDigest":"sha256:90ae868c3336df3920abf1fa6480a14152b7bd63834440a8bbb19dfaf63f1656","tags":["latest"],"imagePushed":false}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/Users/yoichiikegawa/Documents/Github/google-cloud/services/cloud-run/java/prj1/cloudruntest/src/main/java/cloudruntest/App.java
Binary file not shown.

0 comments on commit d900e96

Please sign in to comment.