Closed studio4development closed 10 years ago
This should work... Could you give us some part of your code to see how you're using the Rest annotations ?
@DayS This is my exact code where a compile error is being reported:
package com.affiliatemanager.rest;
import org.springframework.http.converter.json.GsonHttpMessageConverter;
import org.springframework.http.converter.json.MappingJacksonHttpMessageConverter;
import com.affiliatemanager.models.PromoRedemption;
import com.googlecode.androidannotations.annotations.rest.Get;
import com.googlecode.androidannotations.annotations.rest.Rest;
@Rest(rootUrl = "[my url omitted]", converters = { GsonHttpMessageConverter.class })
public interface RestClient
{
@Get("/promo/{pid}")
PromoRedemption redeemPromo(String pid);
}
@DayS any idea on this? I don't know what I'm supposed to do to fix this.
Are there known issues between certain versions AndroidAnnotations and SpringAndroid? I've got 2.7.1 for AndroidAnnotations and 1.0.1 Release build for SpringAndroid...
I don't heard about this kind of issue between AA and SpringAndroid. As you said both GsonHttpMessageConverter
and MappingJacksonHttpMessageConverter
extends of HttpMessageConverter
.
I also tried to compile your code with :
Everything works for me. Could you check that your dependencies are fine (version in the filename match the real version, etc...) ?
same trouble... me too .. T^T help me
Do you still have this issue ? If not, I'll close this issue. Otherwise, could you provide us as much information as possible.
Technically the issue still exists because nothing was ever changed or fixed. There really wasn't any more code involved than what I already posted, so its not possible to post more. I ended up reversing course and doing things the long way because this setup just would not work. I hope somebody figures something out so I can use Android Annotations for web service integration.
Ok, I'll try again to reproduce it then.
I'm closing this one as it seems to be a config issue, not an AA one.
its not working
@satyaranjan please elaborate...
When trying to define a rest template using the @Rest annotation, and when providing one or more "converters" in that annotation, I receive the following compile error:
When, in fact, I have tried to pass in GsonHttpMessageConverter.class and MappingJacksonHttpMessageConverter.class which are both such subtypes.
I have the following libraries included in my /libs directory
I'm not sure if this is an issue with AndroidAnnotations or with my own setup, but help would be appreciated.