0

Does anyone know a good example for using Guice with the new Google Endpoints Frameworks for App Engine Version 2.

In the Documentation

Migrating to Endpoints Frameworks for App Engine

Guice is mentioned at the end of the docu. But i am missing a full example with web.xml, appengine-web.xml, Module class and Eclipse.

SmilingM
  • 325
  • 1
  • 3
  • 9

2 Answers2

0
  1. Add endpoints-framework-guice as a dependency.
  2. Add an instance of EndpointsModule to your GuiceFilter.
  3. Additionally bind GuiceFilter to /_ah/api/* in web.xml to work around a legacy URL resolution issue.
saiyr
  • 2,535
  • 1
  • 9
  • 13
  • Do you have some sample code for the web.xml, GuiceFIlter and EndpointsModule? Does this work for Endpoints Framework: https://github.com/google/guice/wiki/ServletModule – SmilingM Aug 20 '17 at 17:46
  • `EndpointsModule` _is_ a `ServletModule`. So yes, they work together. – saiyr Aug 21 '17 at 18:30
0

Please review the Using Guice with Endpoints Frameworks guide.

The example demonstrates how to use Endpoints Framework v2 with Guice.

Frank Natividad
  • 534
  • 4
  • 16