Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
455 views
in Technique[技术] by (71.8m points)

java - Why doesn't Spring Boot provide an on_param option for includeException?

Spring Boot provides a default error response format with a number of properties, some of which must be opted into including:

{
  "timestamp": "2021-01-25T20:29:27.984+00:00",
  "status": 400,
  "error": "Bad Request",
  "exception": "org.springframework.http.converter.HttpMessageNotReadableException",
  "trace": "<multi-line stack trace goes here>",
  "path": "/path/to/endpoint"
}

Spring Boot provides a number of properties for whether to include the optional details in its error responses:

Key Default Value Description
server.error.include-binding-errors never When to include "errors" attribute.
server.error.include-exception false Include the "exception" attribute.
server.error.include-message never When to include "message" attribute.
server.error.include-stacktrace never When to include the "trace" attribute.
question from:https://stackoverflow.com/questions/65893339/why-doesnt-spring-boot-provide-an-on-param-option-for-includeexception

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...