相关疑难解决方法(0)

修改Spring Boot Rest Controller的默认JSON错误响应

目前spring boot的错误响应包含如下标准内容:

{
   "timestamp" : 1426615606,
   "exception" : "org.springframework.web.bind.MissingServletRequestParameterException",
   "status" : 400,
   "error" : "Bad Request",
   "path" : "/welcome",
   "message" : "Required String parameter 'name' is not present"
}
Run Code Online (Sandbox Code Playgroud)

我正在寻找一种摆脱响应中"异常"属性的方法.有没有办法实现这个目标?

rest spring json spring-boot

32
推荐指数
3
解决办法
2万
查看次数

标签 统计

json ×1

rest ×1

spring ×1

spring-boot ×1