GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — java-docs-samples/appengine-java8/endpoints-v2-migration at master · jush/java-docs-samples

Expand file tree

/

endpoints-v2-migration

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
 
 
/

endpoints-v2-migration

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
gradle/wrapper
gradle/wrapper
 
 
src/main
src/main
 
 
README.md
README.md
 
 
build.gradle
build.gradle
 
 
gradlew
gradlew
 
 
gradlew.bat
gradlew.bat
 
 
jenkins.sh
jenkins.sh
 
 
pom.xml
pom.xml
 
 

README.md

Outline

Hello World Google Cloud Endpoints for App Engine

Open in Cloud Shell

This sample provides an example of a migration from the prior version of Google Cloud Endpoints Frameworks to new Google Cloud Endpoints Frameworks for App Engine using a Discovery Document. Additionally, this sample provides an example of using the new App Engine Maven and Gradle plugins for deploying your Google App Engine Standard applications.

Google Cloud Endpoints Frameworks v2.0 provides new functionality which may require payment and uses an OpenAPI specification. The OpenAPI development process is explained here and a quickstart is provided here.

Products

  • Google App Engine Standard

Language

  • Java

APIs

  • Google Cloud Endpoints Frameworks v2.0
  • Google Cloud Endpoints Frameworks v1.0

Build and Deployment Plugins

  • Google App Engine Maven plugin
  • Google App Engine Gradle plugin

Discovery Document and Client Library Generation Plugins

  • Google Cloud Endpoints Frameworks Maven Plugin
  • Google Cloud Endpoints Frameworks Gradle Plugin

Setup

  1. Change YOUR-PROJECT-ID with your project id in the hostname parameter defined in either the Maven or Gradle build script. Hostname is used when a discovery document is generated.

    • Maven - pom.xml
    • Gradle - build.gradle
  2. [Optional]: User Authenticating with Google Accounts in Web Clients

    1. Update the WEB_CLIENT_ID in Constants.java to reflect the web client ID you have registered in the Credentials on Developers Console for OAuth 2.0 client IDs.

    2. Update the value of google.devrel.samples.helloendpoints.CLIENT_ID in base.js to reflect the web client ID you have registered in the Credentials on Developers Console for OAuth 2.0 client IDs.

  3. [Optional]: User Authenticating with Google Accounts in other Applications Types

    • Inside Constants.java you will find placeholders for Android applications using Google Accounts client IDs registered in the Credentials on Developers Console for OAuth 2.0 client IDs.

    • Note: iOS support should work but has not been fully tested.

    • These client IDs are used when defining annotation for this sample API found in Greetings.java.

    • You can read more about different user authentication supported here.

Build and Deployment

Maven

  1. Build and Run the application locally at http://localhost:8080 by using:

    mvn clean appengine:run

  2. Explore local server's API explorer by browsing to:

    http://localhost:8080/_ah/api/explorer

  3. Generate the discovery document located at target/discovery-docs/helloworld-v1-rest.discovery by using:

    mvn endpoints-framework:discoveryDocs

  4. Generate the client library located at target/client-libs/helloworld-v1-java.zip by using:

    mvn endpoints-framework:clientLibs

  5. Build and Deploy your application to Google App Engine by using:

    mvn clean appengine:deploy

Gradle

  1. Build and Run the application locally at http://localhost:8080 by using:

    ./gradlew clean appengineRun

    Windows users: Use gradlew.bat instead of ./gradlew

  2. Explore local server's API explorer by browsing to:

    http://localhost:8080/_ah/api/explorer

  3. Generate the discovery document located at build/endpointsDiscoveryDocs/helloworld-v1-rest.discovery by using:

    ./gradlew endpointsDiscoveryDocs

  4. Generate the client library located at build/endpointsClientLibs/helloworld-v1-java.zip by using:

    ./gradlew endpointsClientLibs

  5. Deploy your application to Google App Engine by using:

    ./gradlew appengineDeploy

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.