Closed cyejing closed 5 years ago
@cyejing 现在是怎么解决的
Same issue #3386
@magang0425 这样
@Override
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
try{
return method.invoke(bean, args);
}catch(InvocationTargetException ite){
throw ite.getTargetException();
}
}
@magang0425 我选择重写 ReferenceAnnotationBeanPostProcessor 方法 如@scm1219 的代码。 等新版修复
Environment
Steps to reproduce this issue
Pls. provide [GitHub address] to reproduce this issue. https://github.com/apache/incubator-dubbo/blob/3375ec827845a0b133eae1fd4aad78aeb203361a/dubbo-config/dubbo-config-spring/src/main/java/com/alibaba/dubbo/config/spring/beans/factory/annotation/ReferenceAnnotationBeanPostProcessor.java#L159
Expected Result
取得真实的异常信息,而不是 InvocationTargetException
Actual Result
到业务层代码的异常时UndeclaredThrowableException ->cause-> InvocationTargetException ->cause-> 真实的异常
If there is an exception, please attach the exception trace: