File tree Expand file tree Collapse file tree 8 files changed +11
-25
lines changed
appengine-java8/endpoints-v2-guice
appengine/endpoints-frameworks-v2/guice-example/src/main/webapp/WEB-INF Expand file tree Collapse file tree 8 files changed +11
-25
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ To build the project:
3434
3535To generate the required configuration file ` openapi.json ` :
3636
37- mvn endpoints-framework:openApiDoc
37+ mvn endpoints-framework:openApiDocs
3838
3939### Deploying the sample API to App Engine
4040
Original file line number Diff line number Diff line change @@ -44,16 +44,20 @@ apply plugin: 'com.google.cloud.tools.appengine'
4444
4545dependencies {
4646 compile ' com.google.endpoints:endpoints-framework:2.0.8'
47+ // [START guice_dependency]
4748 compile ' com.google.endpoints:endpoints-framework-guice:'
49+ // [END guice_dependency]
4850 compile ' com.google.endpoints:endpoints-management-control-appengine:1.0.5'
4951 compile ' com.google.endpoints:endpoints-framework-auth:1.0.5'
5052}
5153
54+ // [START endpoints_plugin_configuration]
5255endpointsServer {
5356 // Endpoints Framework Plugin server-side configuration
5457 hostname = " ${ projectId} .appspot.com"
5558 serviceClasses = [' com.example.echo.Echo' ]
5659}
60+ // [END endpoints_plugin_configuration]
5761
5862appengine { // App Engine tasks configuration
5963 deploy { // deploy configuration
Original file line number Diff line number Diff line change 4747 <artifactId >endpoints-framework</artifactId >
4848 <version >${endpoints.framework.version} </version >
4949 </dependency >
50+ <!-- [START guice_dependency] -->
5051 <dependency >
5152 <groupId >com.google.endpoints</groupId >
5253 <artifactId >endpoints-framework-guice</artifactId >
5354 <version >2.0.9</version >
5455 </dependency >
56+ <!-- [END guice_dependency] -->
5557 <dependency >
5658 <groupId >com.google.endpoints</groupId >
5759 <artifactId >endpoints-management-control-appengine-all</artifactId >
102104 <!-- deploy configuration -->
103105 </configuration >
104106 </plugin >
107+ <!-- [START endpoints_plugin] -->
105108 <plugin >
106109 <groupId >com.google.cloud.tools</groupId >
107110 <artifactId >endpoints-framework-maven-plugin</artifactId >
113116 <serviceClass >com.example.echo.Echo</serviceClass >
114117 </serviceClasses >
115118 </configuration >
116- <dependencies >
117- <dependency >
118- <groupId >com.google.endpoints</groupId >
119- <artifactId >endpoints-management-control-appengine-all</artifactId >
120- <version >1.0.5</version >
121- </dependency >
122- </dependencies >
123119 </plugin >
120+ <!-- [START endpoints_plugin] -->
124121 <plugin >
125122 <groupId >org.codehaus.mojo</groupId >
126123 <artifactId >versions-maven-plugin</artifactId >
Original file line number Diff line number Diff line change 1616
1717package com .example .echo ;
1818
19- //import com.google.api.server.spi.guice.GuiceServletContextListener;
2019import com .google .inject .Guice ;
2120import com .google .inject .Injector ;
2221import com .google .inject .servlet .GuiceServletContextListener ;
Original file line number Diff line number Diff line change 1818 <runtime >java8</runtime >
1919 <threadsafe >true</threadsafe >
2020
21- <basic-scaling >
22- <max-instances >2</max-instances >
23- </basic-scaling >
24-
2521 <system-properties >
2622 <property name =" java.util.logging.config.file" value =" WEB-INF/logging.properties" />
2723 </system-properties >
Original file line number Diff line number Diff line change 1717<web-app xmlns =" http://java.sun.com/xml/ns/javaee" version =" 2.5" >
1818 <!-- Wrap the backend with Endpoints Frameworks v2. -->
1919 <!-- Route API method requests to the backend using Guice. -->
20+ <!-- [START guice_configuration] -->
2021 <filter >
2122 <filter-name >guiceFilter</filter-name >
2223 <filter-class >com.google.inject.servlet.GuiceFilter</filter-class >
3536 <listener >
3637 <listener-class >com.example.echo.EchoGuiceListener</listener-class >
3738 </listener >
38-
39- <welcome-file-list >
40- <welcome-file >index.html</welcome-file >
41- </welcome-file-list >
39+ <!-- [END guice_configuration] -->
4240
4341</web-app >
Original file line number Diff line number Diff line change 1717<appengine-web-app xmlns =" http://appengine.google.com/ns/1.0" >
1818 <threadsafe >true</threadsafe >
1919
20- <basic-scaling >
21- <max-instances >2</max-instances >
22- </basic-scaling >
23-
2420 <system-properties >
2521 <property name =" java.util.logging.config.file" value =" WEB-INF/logging.properties" />
2622 </system-properties >
Original file line number Diff line number Diff line change 3636 <listener-class >com.example.echo.EchoGuiceListener</listener-class >
3737 </listener >
3838
39- <welcome-file-list >
40- <welcome-file >index.html</welcome-file >
41- </welcome-file-list >
42-
4339</web-app >
You can’t perform that action at this time.
0 commit comments