-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Closed
Closed
Copy link
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)status: backportedAn issue that has been backported to maintenance branchesAn issue that has been backported to maintenance branchestype: enhancementA general enhancementA general enhancement
Milestone
Description
Yanming Zhou opened SPR-16054 and commented
I am implementing MethodInterceptor to translate method call to rest api call, so I need translate method.getGenericReturnType() to ParameterizedTypeReference for ResponseEntity, Here is my hack:
new ParameterizedTypeReference<Object>() {
@Override
public Type getType() {
return method.getGenericReturnType();
}
}
I wish spring provide such as:
public static ParameterizedTypeReference<?> from(Type type){
return new ParameterizedTypeReference<Object>() {
@Override
public Type getType() {
return type;
}
};
}
Backported to: 4.3.12
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)status: backportedAn issue that has been backported to maintenance branchesAn issue that has been backported to maintenance branchestype: enhancementA general enhancementA general enhancement