| Modifier and Type | Field and Description |
|---|---|
protected org.springframework.http.HttpStatus |
ok
响应正常的HTTP响应码
|
| Constructor and Description |
|---|
ResponseProcessor() |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.http.ResponseEntity<java.lang.String> |
error(java.lang.String msg)
创建一个
HttpStatus.INTERNAL_SERVER_ERROR 的
ResponseEntity对象 |
org.springframework.http.ResponseEntity<java.lang.String> |
error(java.lang.String code,
java.lang.String msg)
创建一个
HttpStatus.INTERNAL_SERVER_ERROR 的
ResponseEntity对象 |
org.springframework.http.ResponseEntity<java.lang.String> |
error(java.lang.Throwable ex)
创建一个
HttpStatus.INTERNAL_SERVER_ERROR 的
ResponseEntity对象 |
org.springframework.http.ResponseEntity<java.lang.String> |
ok(org.json.JSONObject jsonObject)
创建一个
HttpStatus.OK 的ResponseEntity对象 |
org.springframework.http.ResponseEntity<java.lang.String> |
ok(java.lang.String responseBody)
创建一个
HttpStatus.OK 的ResponseEntity对象 |
public org.springframework.http.ResponseEntity<java.lang.String> ok(java.lang.String responseBody)
HttpStatus.OK 的ResponseEntity对象responseBody - 响应体ResponseEntity<String>public org.springframework.http.ResponseEntity<java.lang.String> ok(org.json.JSONObject jsonObject)
HttpStatus.OK 的ResponseEntity对象jsonObject - 响应体ResponseEntity<String>public org.springframework.http.ResponseEntity<java.lang.String> error(java.lang.String code,
java.lang.String msg)
HttpStatus.INTERNAL_SERVER_ERROR 的
ResponseEntity对象code - 错误的响应代码msg - 错误的响应说明ResponseEntity<String>public org.springframework.http.ResponseEntity<java.lang.String> error(java.lang.String msg)
HttpStatus.INTERNAL_SERVER_ERROR 的
ResponseEntity对象msg - 错误的响应说明. code 的值为 500ResponseEntity<String>public org.springframework.http.ResponseEntity<java.lang.String> error(java.lang.Throwable ex)
HttpStatus.INTERNAL_SERVER_ERROR 的
ResponseEntity对象ex - 异常对象. code 的值为 500;msg 的值为 ex.getMessage()ResponseEntity<String>