Cloud Endpoint parameter should not be named

后端 未结 4 1118
野的像风
野的像风 2021-01-13 11:29

I want send a HashMap from JS application to my Google App. I created a HashMapContainer class such as in : Cloud Endpoints C

4条回答
  •  长发绾君心
    2021-01-13 12:16

    The example in This doc shows the annotations used in a different order from what your code shows.

    public Resource get(@Named("id") @Nullable int id) { … }

    So according to this, your

    @Nullable @Named('param2') HashMapContainer param2) {

    should become

    @Named('param2') @Nullable HashMapContainer param2) {
    

    I tested it out both ways - only the latter seems to work for me.

提交回复
热议问题