public final class ResponseContentUtil extends Object
| 构造器和说明 |
|---|
ResponseContentUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static <T> ResponseContent<T> |
build(T model)
Build the successful response with data model.
|
static ResponseContent |
handleBadRequest(String errorMsg)
Build the bad request response.
|
static ResponseContent |
handleException(String errorMsg)
Build the error response of exception.
|
static ResponseContent |
success()
Build the successful response without data model.
|
public static ResponseContent success()
public static <T> ResponseContent<T> build(T model)
T - data model typemodel - data modelpublic static ResponseContent handleBadRequest(String errorMsg)
errorMsg - error messagepublic static ResponseContent handleException(String errorMsg)
errorMsg - error messageCopyright © 2020 The Apache Software Foundation. All rights reserved.