Class RequestBodyResolver
java.lang.Object
fr.paris.lutece.portal.util.mvc.binding.AbstractParameterResolver
fr.paris.lutece.portal.util.mvc.binding.RequestBodyResolver
- All Implemented Interfaces:
ParameterResolver
Resolver for method parameters annotated with
RequestBody.
Extracts and deserializes the HTTP request body into the target object type.
This resolver supports JSON deserialization using Jackson ObjectMapper. It can handle various content types including application/json, application/xml, and plain text depending on the target parameter type.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionResolves and converts the given parameter from the HTTP request.booleanChecks if the resolver can handle the given parameter.
-
Constructor Details
-
RequestBodyResolver
public RequestBodyResolver()
-
-
Method Details
-
supports
Checks if the resolver can handle the given parameter.- Parameters:
parameter- the parameter to check- Returns:
- true if the resolver can handle the parameter, false otherwise
-
resolve
public ResolverResult<?> resolve(jakarta.servlet.http.HttpServletRequest request, Parameter parameter) Resolves and converts the given parameter from the HTTP request.- Parameters:
request- the HTTP requestparameter- the parameter to resolve- Returns:
- the result of the resolution and conversion
-