| 程序包 | 说明 |
|---|---|
| top.lshaci.framework.web.handler.exception | |
| top.lshaci.framework.web.model | |
| top.lshaci.framework.web.utils |
| 限定符和类型 | 方法和说明 |
|---|---|
JsonResponse<Object> |
GlobalExceptionHandler.argumentExceptionHandler(javax.servlet.http.HttpServletRequest req,
Exception e)
BindException and MethodArgumentNotValidException handler
|
JsonResponse<Object> |
GlobalExceptionHandler.baseExceptionHandler(javax.servlet.http.HttpServletRequest req,
Exception e)
Base exception handler
|
JsonResponse<Object> |
GlobalExceptionHandler.defaultExceptionHandler(javax.servlet.http.HttpServletRequest req,
Exception e)
Default exception handler
|
| 限定符和类型 | 方法和说明 |
|---|---|
JsonResponse<R> |
JsonResponse.addOtherData(String key,
Object value)
Add other data value
|
static <R> JsonResponse<R> |
JsonResponse.failure(String message)
Build a failure json response with message
|
static <R> JsonResponse<R> |
JsonResponse.message(boolean status,
String message)
Build a message json response with status and message
|
JsonResponse<R> |
JsonResponse.removeOtherData(String key)
Remove other data value
|
JsonResponse<R> |
JsonResponse.setCode(int code)
Set response code
|
JsonResponse<R> |
JsonResponse.setData(R data)
Set response data
|
JsonResponse<R> |
JsonResponse.setMessage(String message)
Set response message
|
JsonResponse<R> |
JsonResponse.setOtherData(Map<String,Object> otherData)
Set other data
|
JsonResponse<R> |
JsonResponse.setStatus(boolean status)
Set response status
|
static <R> JsonResponse<R> |
JsonResponse.success(R data)
Build a success json response with data
|
static <R> JsonResponse<R> |
JsonResponse.successMessage(String message)
Build a success json response with message
|
| 限定符和类型 | 方法和说明 |
|---|---|
static <R> void |
HttpResponseUtils.responseJson(JsonResponse<R> jsonResponse)
Response json use the http servlet response
|
Copyright © 2019. All rights reserved.