mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-10-22 03:27:39 +08:00
🐛 修复某些情况下会抛出CannotResolveClassException异常错误的问题
https://stackoverflow.com/questions/9508292/nodecom-thoughtworks-xstream-mapper-cannotresolveclassexception-while-using-xstr
This commit is contained in:
@@ -150,6 +150,7 @@ public abstract class BaseWxPayResult {
|
||||
}
|
||||
XStream xstream = XStreamInitializer.getInstance();
|
||||
xstream.processAnnotations(clz);
|
||||
xstream.setClassLoader(BaseWxPayResult.class.getClassLoader());
|
||||
T result = (T) xstream.fromXML(xmlString);
|
||||
result.setXmlString(xmlString);
|
||||
return result;
|
||||
|
Reference in New Issue
Block a user