Skip to content
This repository has been archived by the owner on Feb 26, 2023. It is now read-only.

RestTemplate converters set in @Rest #377

Merged
merged 1 commit into from Nov 4, 2012
Merged

RestTemplate converters set in @Rest #377

merged 1 commit into from Nov 4, 2012

Conversation

pyricau
Copy link
Contributor

@pyricau pyricau commented Nov 4, 2012

See #206.

We're updating AndroidAnnotations to work with RestTemplate 1.0.0.RELEASE. This means that we must accomodate to the changes. One of these changes is that RestTemplate default constructor now comes with no converters. So we must reflect that on the API, by forcing the user to explicitly declare the converters to use, because the most common case is to actually use converters.

@Rest now holds a new converters() parameter on which one can define the converter classes to use. The value() parameter has been renamed to rootUrl() and is still optional.

Usage example:

@Rest(rootUrl = "http://company.com/ajax/services", converters = { MappingJacksonHttpMessageConverter.class })
public interface MyService {
}

pyricau added a commit that referenced this pull request Nov 4, 2012
RestTemplate converters set in @rest. Fixes #206.
@pyricau pyricau merged commit 9c44975 into develop Nov 4, 2012
@DayS DayS mentioned this pull request Nov 9, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant