https://codelabs.developers.google.com/codelabs/cloud-app-engine-springboot/index.html
$ curl https://start.spring.io/starter.tgz -d packaging=war
-d dependencies=web -d baseDir=gae-standard-example | tar -xzvf -
$ cd gae-standard-example
$ mkdir -p src/main/webapp/WEB-INF/ $ touch src/main/webapp/WEB-INF/appengine-web.xml
true java8@SpringBootApplication @RestController public class DemoApplication { public static void main(String[] args) { SpringApplication.run(DemoApplication.class, args); }
@GetMapping("/") public String hello() { return "hello world!"; } }
Once the application started, click on the Web Preview icon in the Cloud Shell toolbar and choose preview on port 8080. ./mvnw -DskipTests spring-boot:run gcloud app create --region us-central ./mvnw -DskipTests appengine:deploy