-
Notifications
You must be signed in to change notification settings - Fork 116
Open
Description
目前注入器在对接回显马时,只有 cn.hutool.extra.servlet.ServletUtil@123
类似的输出,没有可参考性。
重写注入器 toString 方法
public class Injector{
private String error;
public Injector() {
try {
List<Object> contexts = getContext();
for (Object context : contexts) {
Object shell = getShell(context);
inject(context, shell);
}
} catch (Exception e) {
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
PrintStream printStream = new PrintStream(outputStream);
e.printStackTrace(printStream);
error = outputStream.toString();
}
}
@Override
public String toString() {
if (error == null) {
return this.getClass().getName() + "-ok";
}
return error;
}
}
这样对接回显马时可初步排除是否是注入阶段问题还是马本身的适配性问题
Metadata
Metadata
Assignees
Labels
No labels