Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

Providing MessageConverter for RestTemplate #206

Copy link
Copy link
@pyricau

Description

@pyricau
Issue body actions

@royclarkson just let me know that the RestTemplate default constructor now comes with no MessageConverters, for performance reasons.

It's quite obvious that no one needs all the default converters, we usually only need one converter.

This change also means that by default, a @Rest annotated interface will come with en empty RestTemplate that will have no MessageConverter. To add one, we must do: restClient.getRestTemplate().getMessageConverters().add(new MappingJacksonHttpMessageConverter());

We should provide a new annotation (or a new attribute) to let users specify the MessageConverters.

@Rest 
@Converters({MappingJacksonHttpMessageConverter.class, XmlAwareFormHttpMessageConverter.class})
public interface RestClient {
}

We should check that they have a default constructor. We could also allow classes annotated with @EBean, but I'm not sure this would provide much added value for now.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.