-
Notifications
You must be signed in to change notification settings - Fork 247
Closed
Description
Hi
It would be nice to be able to have the possibility to unwrap a class type before giving it into the TypeProcessor
handling.
I saw, for example, that you already handle ResponseEntity
in the SpringApplicationParser
explicitly and would need this feature to be available from outside so we can inject our own unwrapping.
A concrete use case would be my jackson filter library where the returnType
is a generic class with the concrete result defined in the generic part:
(https://github.com/Antibrumm/jackson-antpathfilter)
@RequestMapping
@ResponseBody
public AntPathFilterMappingJacksonValue<SomeClass> getSomeObject() {
return new AntPathFilterMappingJacksonValue<>(someObject, "*", "*.*", "!not.that.path");
}
Similar to ResponseEntity
I would need to give the class SomeClass
into the modelReturnType
.
final Class<?> returnType = method.getReturnType();
final Type genericReturnType = method.getGenericReturnType();
final Type modelReturnType = unwrapReturnType(genericReturnType);
Metadata
Metadata
Assignees
Labels
No labels