feiniaojin / graceful-response

Spring Boot接口响应处理解决方案,提供统一返回值封装、全局异常处理、自定义异常错误码、参数校验增强、断言增强等功能
https://doc.feiniaojin.com
MIT License
1.09k stars 164 forks source link

feat: 跳过指定返回类型 #49

Closed yhan219 closed 5 months ago

yhan219 commented 5 months ago

对于一些历史遗留项目,例如若依类的框架,或者自己已经封装了返回类型的,而且代码中大量存在return Result.success(xxx)之类的,可以使用该配置。

配置文件中添加

  # 例外返回类型,返回该类型的方法将被忽略处理
  exclude-return-types:
    - com.example.demo.Result
feiniaojin commented 5 months ago

非常棒,周末我们看看代码,没问题的话合进去

yhan219 commented 5 months ago

请问测试后还有什么问题没?