feiniaojin / graceful-response

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

GlobalExceptionAdvice类空指针异常 #25

Closed systemoutprintlnnnn closed 11 months ago

systemoutprintlnnnn commented 11 months ago

GlobalExceptionAdvice类中的属性不知道为什么带@Resource注解的属性都没有注入 包括ResponseFactory、GracefulResponseProperties、ResponseStatusFactory

java.lang.NullPointerException: Cannot invoke "com.feiniaojin.gracefulresponse.GracefulResponseProperties.isPrintExceptionInGlobalAdvice()" because "this.gracefulResponseProperties" is null at com.feiniaojin.gracefulresponse.advice.GlobalExceptionAdvice.exceptionHandler(GlobalExceptionAdvice.java:57) ~[graceful-response-3.1.0.jar:na]

systemoutprintlnnnn commented 11 months ago

我的springboot版本是3.x,是否和这个相关

feiniaojin commented 11 months ago

您好,我们分别对Spring Boot 2.x和3.x进行了适配,欢迎选择对应的版本。

Spring Boot版本 Graceful Response版本 graceful-response-example分支
2.x 3.2.0-boot2 3.2.0-boot2
3.x 3.2.0-boot3 3.2.0-boot3