程序包 cool.scx.mvc
类 ScxMvcRequestInfo
java.lang.Object
cool.scx.mvc.ScxMvcRequestInfo
封装 RoutingContext 的参数 防止反复取值造成性能损失
- 版本:
- 1.4.7
- 作者:
- scx567888
-
嵌套类概要
嵌套类 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明com.fasterxml.jackson.databind.JsonNodebody()static com.fasterxml.jackson.databind.JsonNodeinitBody(io.vertx.ext.web.RoutingContext ctx, ScxMvcRequestInfo.ContentType contentType) 根据不同的 ContentType 以不同的逻辑初始化 bodyinitContentType(io.vertx.ext.web.RoutingContext ctx) initContentType.static com.fasterxml.jackson.databind.JsonNodereadJson.static com.fasterxml.jackson.databind.JsonNodereadXml.io.vertx.ext.web.RoutingContextstatic com.fasterxml.jackson.databind.JsonNodetryReadOrTextNode(String str) 走到这里标识以上的匹配全部失败 , 这里不知道 body 的具体格式 所以进行猜测转换
-
构造器详细资料
-
ScxMvcRequestInfo
public ScxMvcRequestInfo(io.vertx.ext.web.RoutingContext ctx)
-
-
方法详细资料
-
initBody
public static com.fasterxml.jackson.databind.JsonNode initBody(io.vertx.ext.web.RoutingContext ctx, ScxMvcRequestInfo.ContentType contentType) 根据不同的 ContentType 以不同的逻辑初始化 body- 参数:
ctx- ctxcontentType- a- 返回:
- c a
-
readJson
readJson.
- 参数:
jsonStr- aStringobject- 返回:
- a
JsonNodeobject
-
readXml
readXml.
- 参数:
xmlStr- aStringobject- 返回:
- a
JsonNodeobject
-
tryReadOrTextNode
走到这里标识以上的匹配全部失败 , 这里不知道 body 的具体格式 所以进行猜测转换- 参数:
str- a- 返回:
- a
-
initContentType
initContentType.
- 参数:
ctx- aRoutingContextobject- 返回:
- a
ScxMvcRequestInfo.ContentTypeobject
-
body
public com.fasterxml.jackson.databind.JsonNode body() -
contentType
-
routingContext
public io.vertx.ext.web.RoutingContext routingContext()
-