-
Notifications
You must be signed in to change notification settings - Fork 2k
Open
Labels
documentationIssues that require updates to our documentationIssues that require updates to our documentationfeedback providedFeedback has been provided to the authorFeedback has been provided to the author
Description
In my implementation I need to use the default decoder for byte[]
and GsonDecoder to map to objects and I'm doing the following in Java 11:
@Bean
public Decoder decoder() {
Decoder decoder = (response, type) -> {
if (type.getTypeName().equals("java.lang.String") ||
type.getTypeName().equals("byte[]")
) {
return new Decoder.Default().decode(response, type);
} else {
return new GsonDecoder().decode(response, type);
}
};
return new ResponseEntityDecoder(decoder);
}
Is this worth having an example in the documentation? I was inspired by this discussion spring-cloud/spring-cloud-netflix#2246
Metadata
Metadata
Assignees
Labels
documentationIssues that require updates to our documentationIssues that require updates to our documentationfeedback providedFeedback has been provided to the authorFeedback has been provided to the author