How can I return a value (i.e. boolean, string, etc.) from either an @endpoint.method or a @MyModel.method (EndpointsModel)?
如何从@ endpoint.method或@MyModel.method(EndpointsModel)返回值(即布尔值,字符串等)?
1 个解决方案
#1
1
As per the documentation, you cannot write simple types like String, int, etc. The return types will need to be a POJO, an array or a Collection.
根据文档,您不能编写简单类型,如String,int等。返回类型需要是POJO,数组或集合。
https://developers.google.com/appengine/docs/java/endpoints/paramreturn_types
https://developers.google.com/appengine/docs/java/endpoints/paramreturn_types
#1
1
As per the documentation, you cannot write simple types like String, int, etc. The return types will need to be a POJO, an array or a Collection.
根据文档,您不能编写简单类型,如String,int等。返回类型需要是POJO,数组或集合。
https://developers.google.com/appengine/docs/java/endpoints/paramreturn_types
https://developers.google.com/appengine/docs/java/endpoints/paramreturn_types