File tree 8 files changed +11
-25
lines changed
appengine/endpoints-frameworks-v2/guice-example/src/main/webapp/WEB-INF
appengine-java8/endpoints-v2-guice
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:
34
34
35
35
To generate the required configuration file ` openapi.json ` :
36
36
37
- mvn endpoints-framework:openApiDoc
37
+ mvn endpoints-framework:openApiDocs
38
38
39
39
### Deploying the sample API to App Engine
40
40
Original file line number Diff line number Diff line change @@ -44,16 +44,20 @@ apply plugin: 'com.google.cloud.tools.appengine'
44
44
45
45
dependencies {
46
46
compile ' com.google.endpoints:endpoints-framework:2.0.8'
47
+ // [START guice_dependency]
47
48
compile ' com.google.endpoints:endpoints-framework-guice:'
49
+ // [END guice_dependency]
48
50
compile ' com.google.endpoints:endpoints-management-control-appengine:1.0.5'
49
51
compile ' com.google.endpoints:endpoints-framework-auth:1.0.5'
50
52
}
51
53
54
+ // [START endpoints_plugin_configuration]
52
55
endpointsServer {
53
56
// Endpoints Framework Plugin server-side configuration
54
57
hostname = " ${ projectId} .appspot.com"
55
58
serviceClasses = [' com.example.echo.Echo' ]
56
59
}
60
+ // [END endpoints_plugin_configuration]
57
61
58
62
appengine { // App Engine tasks configuration
59
63
deploy { // deploy configuration
Original file line number Diff line number Diff line change 47
47
<artifactId >endpoints-framework</artifactId >
48
48
<version >${endpoints.framework.version} </version >
49
49
</dependency >
50
+ <!-- [START guice_dependency] -->
50
51
<dependency >
51
52
<groupId >com.google.endpoints</groupId >
52
53
<artifactId >endpoints-framework-guice</artifactId >
53
54
<version >2.0.9</version >
54
55
</dependency >
56
+ <!-- [END guice_dependency] -->
55
57
<dependency >
56
58
<groupId >com.google.endpoints</groupId >
57
59
<artifactId >endpoints-management-control-appengine-all</artifactId >
102
104
<!-- deploy configuration -->
103
105
</configuration >
104
106
</plugin >
107
+ <!-- [START endpoints_plugin] -->
105
108
<plugin >
106
109
<groupId >com.google.cloud.tools</groupId >
107
110
<artifactId >endpoints-framework-maven-plugin</artifactId >
113
116
<serviceClass >com.example.echo.Echo</serviceClass >
114
117
</serviceClasses >
115
118
</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 >
123
119
</plugin >
120
+ <!-- [START endpoints_plugin] -->
124
121
<plugin >
125
122
<groupId >org.codehaus.mojo</groupId >
126
123
<artifactId >versions-maven-plugin</artifactId >
Original file line number Diff line number Diff line change 16
16
17
17
package com .example .echo ;
18
18
19
- //import com.google.api.server.spi.guice.GuiceServletContextListener;
20
19
import com .google .inject .Guice ;
21
20
import com .google .inject .Injector ;
22
21
import com .google .inject .servlet .GuiceServletContextListener ;
Original file line number Diff line number Diff line change 18
18
<runtime >java8</runtime >
19
19
<threadsafe >true</threadsafe >
20
20
21
- <basic-scaling >
22
- <max-instances >2</max-instances >
23
- </basic-scaling >
24
-
25
21
<system-properties >
26
22
<property name =" java.util.logging.config.file" value =" WEB-INF/logging.properties" />
27
23
</system-properties >
Original file line number Diff line number Diff line change 17
17
<web-app xmlns =" http://java.sun.com/xml/ns/javaee" version =" 2.5" >
18
18
<!-- Wrap the backend with Endpoints Frameworks v2. -->
19
19
<!-- Route API method requests to the backend using Guice. -->
20
+ <!-- [START guice_configuration] -->
20
21
<filter >
21
22
<filter-name >guiceFilter</filter-name >
22
23
<filter-class >com.google.inject.servlet.GuiceFilter</filter-class >
35
36
<listener >
36
37
<listener-class >com.example.echo.EchoGuiceListener</listener-class >
37
38
</listener >
38
-
39
- <welcome-file-list >
40
- <welcome-file >index.html</welcome-file >
41
- </welcome-file-list >
39
+ <!-- [END guice_configuration] -->
42
40
43
41
</web-app >
Original file line number Diff line number Diff line change 17
17
<appengine-web-app xmlns =" http://appengine.google.com/ns/1.0" >
18
18
<threadsafe >true</threadsafe >
19
19
20
- <basic-scaling >
21
- <max-instances >2</max-instances >
22
- </basic-scaling >
23
-
24
20
<system-properties >
25
21
<property name =" java.util.logging.config.file" value =" WEB-INF/logging.properties" />
26
22
</system-properties >
Original file line number Diff line number Diff line change 36
36
<listener-class >com.example.echo.EchoGuiceListener</listener-class >
37
37
</listener >
38
38
39
- <welcome-file-list >
40
- <welcome-file >index.html</welcome-file >
41
- </welcome-file-list >
42
-
43
39
</web-app >
You can’t perform that action at this time.
0 commit comments