public interface ShenyuResult<T>
| 限定符和类型 | 方法和说明 |
|---|---|
default org.springframework.http.MediaType |
contentType(org.springframework.web.server.ServerWebExchange exchange,
java.lang.Object formatted)
the response context type, default is application/json.
|
default T |
error(int code,
java.lang.String message,
java.lang.Object object)
Error t.
|
default T |
error(org.springframework.web.server.ServerWebExchange exchange,
int code,
java.lang.String message,
java.lang.Object object)
Error t.
|
default java.lang.Object |
format(org.springframework.web.server.ServerWebExchange exchange,
java.lang.Object origin)
format the origin, default is json format except the basic and bytes.
|
default java.lang.Object |
result(org.springframework.web.server.ServerWebExchange exchange,
java.lang.Object formatted)
The response result.
|
default java.lang.Object result(org.springframework.web.server.ServerWebExchange exchange,
java.lang.Object formatted)
exchange - the exchangeformatted - the formatted data that is origin data(basic、byte[]) or json stringdefault java.lang.Object format(org.springframework.web.server.ServerWebExchange exchange,
java.lang.Object origin)
exchange - the exchangeorigin - the origindefault org.springframework.http.MediaType contentType(org.springframework.web.server.ServerWebExchange exchange,
java.lang.Object formatted)
exchange - the exchangeformatted - the formatted data that is origin data(basic、byte[]) or json stringdefault T error(org.springframework.web.server.ServerWebExchange exchange, int code, java.lang.String message, java.lang.Object object)
exchange - the exchangecode - the codemessage - the messageobject - the objectdefault T error(int code, java.lang.String message, java.lang.Object object)
code - the codemessage - the messageobject - the objectCopyright © 2026 The Apache Software Foundation. All rights reserved.