| 类 | 说明 |
|---|---|
| CustomResponseAdvice |
类描述
|
| DateConverter |
把格式化的时间字符串转换为日期对象
|
| ExceptionAdvice |
spring cloud的统一异常处理
|
| ExceptionConfiguration |
异常统一处理配置
spring:
rest:
advice:
exception:
code-name: code
classes:
- name: org.springframework.web.HttpRequestMethodNotSupportedException
code: 404
message: 接口不存在
- name: org.springframework.web.bind.MethodArgumentNotValidException
code: -2
- name: org.springframework.web.bind.MissingRequestHeaderException
code: -2
message: 缺少头部参数
- name: org.springframework.web.method.annotation.MethodArgumentTypeMismatchException
code: -2
message: 参数数据类型不匹配
- name: org.springframework.http.converter.HttpMessageNotReadableException
code: -2
message: 不能识别的参数
- name: org.springframework.validation.BindException
code: -2
|
| TimeConverter |
日期时间的格式转换器
|