Class FromBodyParameterHandler
java.lang.Object
cool.scx.web.parameter_handler.from_body.FromBodyParameterHandler
- All Implemented Interfaces:
ParameterHandler
FromBodyParameterHandler
- Version:
- 0.0.1
- Author:
- scx567888
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectgetValueFromBody(String name, boolean useAllBody, boolean required, com.fasterxml.jackson.databind.JavaType javaType, RequestInfo info) handle(RequestInfo requestInfo) 将结果处理并返回static <T> TreadValue(com.fasterxml.jackson.databind.JsonNode jsonNode, com.fasterxml.jackson.databind.JavaType type)
-
Constructor Details
-
FromBodyParameterHandler
-
-
Method Details
-
getValueFromBody
public static Object getValueFromBody(String name, boolean useAllBody, boolean required, com.fasterxml.jackson.databind.JavaType javaType, RequestInfo info) throws RequiredParamEmptyException, ParamConvertException -
readValue
public static <T> T readValue(com.fasterxml.jackson.databind.JsonNode jsonNode, com.fasterxml.jackson.databind.JavaType type) throws IOException - Throws:
IOException
-
handle
Description copied from interface:ParameterHandler将结果处理并返回- Specified by:
handlein interfaceParameterHandler- Parameters:
requestInfo- 包装后的 RoutingContext- Returns:
- 处理后的结果
- Throws:
Exception- e
-