- Apache Maven 3.3.9 or greater
- Google Cloud SDK
gcloud components install app-engine-java
gcloud components update
Use either:
gcloud init
gcloud beta auth application-default login
We support building with Maven, Gradle, and Intelij Idea. The samples have files to support both Maven and Gradle. To use the IDE plugins, see the documentation pages above.
Using Maven and the App Engine Plugin & Maven Plugin Goals and Parameters
$ mvn jetty:run
-OR-
$ mvn jetty:run-exploded
-OR-
$ mvn clean install jetty:run
$ mvn appengine:deploy
-OR-
$ mvn clean install appengine:stage appengine:deploy
$ gcloud compute firewall-rules create default-allow-websockets \
--allow tcp:65080 \
--target-tags websocket \
--description "Allow websocket traffic on port 65080"
// In order to use websockets on App Engine, you need to connect directly to // application instance using the instance's public external IP. This IP can // be obtained from the metadata server.
METADATA_NETWORK_INTERFACE_URL = 'http://metadata.google.internal/computeMetadata/v1/instance/network-interfaces/0/access-configs/0/external-ip';
http://metadata.google.internal/computeMetadata/v1/instance/network-interfaces/0/access-configs/0/external-ip -OR- http://metadata/computeMetadata/v1/instance/network-interfaces/0/access-configs/0/external-ip
https://stackoverflow.com/questions/25708617/spring-4-websocket-configure-port
http://docs.spring.io/spring/docs/current/spring-framework-reference/html/websocket.html