Package cool.scx.web.parameter_handler
Class FromBodyParameterHandler
java.lang.Object
cool.scx.web.parameter_handler.FromBodyParameterHandler
- All Implemented Interfaces:
ParameterHandler
FromBodyParameterHandler
- Version:
- 1.11.8
- Author:
- scx567888
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanHandle(ParameterInfo parameter) 判断是否可以处理这个参数类型static ObjectgetValueFromBody(String name, boolean useAllBody, boolean required, com.fasterxml.jackson.databind.JavaType javaType, RequestInfo info) handle(ParameterInfo parameter, RequestInfo requestInfo) 将结果处理并返回
-
Constructor Details
-
FromBodyParameterHandler
public 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 -
canHandle
Description copied from interface:ParameterHandler判断是否可以处理这个参数类型- Specified by:
canHandlein interfaceParameterHandler- Parameters:
parameter- 参数实例- Returns:
- 是否能够处理
-
handle
Description copied from interface:ParameterHandler将结果处理并返回- Specified by:
handlein interfaceParameterHandler- Parameters:
parameter- 方法参数requestInfo- 包装后的 RoutingContext- Returns:
- 处理后的结果
- Throws:
Exception- e
-