Java – cloud endpoint collection parameters
•
Java
I'm using Google App Engine cloud endpoints. I'm trying to receive a collection parameter
This:
public List<Pair> initializationSetup(Pair pPair){}
Works, but if I try to receive a list of pairs, it will not be created API file
public List<Pair> initializationSetup(List<Pair> pPairs){
thank you
Solution
Cloud endpoints only handles classes with bean standards
So I created a new class called objectlistcontainer:
public class ObjectListContainer { public List<Object> getObjectsList() { return ObjectsList; } public void setObjectsList(List<Object> objectsList) { ObjectsList = objectsList; } private List<Object> ObjectsList; }
The same problem, if you try to return a string, you can't You must create a stringcontainer
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码