Skip to content

[BUG] 建议 spring-boot-demo-exception-handler 支持 自适应客户端 #91

@alexanders9

Description

@alexanders9

问题描述:

spring-boot-exception-handler 模块中,我认为不应该通过抛出对应的异常而指向不同的客户端。
而是应该针对所有被 ControllerAdvice 捕获的异常都自适应各个客户端。
简而言之,针对同一个被捕获的异常,使用浏览器得到是错误页面,而postman则拿到 json。

关键代码:

image
image

Metadata

Metadata

Assignees

Labels

bug错误

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions