GithubHelp home page GithubHelp logo

ratanasoth / gae-flex-springboot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sophea/gae-flex-springboot

0.0 2.0 0.0 28 KB

Spring Boot based sample backend app running GAE Flex environment using google NoSql datastore service

Java 100.00%

gae-flex-springboot's Introduction

Spring Boot based sample backend app running GAE Flex environment

This sample shows how to run a Spring Boot application on Google Cloud Platform. It uses the Google App Engine flexible environment.

Before you begin

This sample assumes you have Java 8 installed.

Download Maven

These samples use the Apache Maven build system. Before getting started, be sure to download and install it. When you use Maven as described here, it will automatically download the needed client libraries.

Create a Project in the Google Cloud Platform Console

If you haven't already created a project, create one now. Projects enable you to manage all Google Cloud Platform resources for your app, including deployment, access control, billing, and services.

  1. Open the Cloud Platform Console.
  2. In the drop-down menu at the top, select Create a project.
  3. Give your project a name.
  4. Make a note of the project ID, which might be different from the project name. The project ID is used in commands and in configurations.

Enable billing for your project.

If you haven't already enabled billing for your project, enable billing now. Enabling billing allows the application to consume billable resources such as running instances and storing data.

Install the Google Cloud SDK.

If you haven't already installed the Google Cloud SDK, install and initialize the Google Cloud SDK now. The SDK contains tools and libraries that enable you to create and manage resources on Google Cloud Platform.

Install the Google App Engine SDK for Java

gcloud components update app-engine-java
gcloud components update

Configure the app.yaml descriptor

The app.yaml descriptor is used to describe URL dispatch and resource requirements. This example sets manual_scaling to 1 to minimize possible costs. These settings should be revisited for production use.

Run the application locally

  1. Set the correct Cloud SDK project via gcloud config set project YOUR_PROJECT to the ID of your application.
  2. Run mvn spring-boot:run
  3. Visit http://localhost:8080
  4. Visit http://localhost:8080/api/categories/v1/all
  5. Visit http://localhost:8080/api/categories/v1/{id}

Deploy to App Engine flexible environment

  1. mvn appengine:deploy
  2. Visit http://YOUR_PROJECT.appspot.com.

Note that deployment to the App Engine flexible environment requires the new com.google.cloud.tools:appengine-maven-plugin plugin.

Java is a registered trademark of Oracle Corporation and/or its affiliates.

gae-flex-springboot's People

Contributors

sophea avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.