增加ssh链接框架
This commit is contained in:
parent
e768188ca5
commit
202d1b52e5
@ -127,7 +127,18 @@ public class SSHWebSocketMessage {
|
|||||||
}
|
}
|
||||||
// 否则使用ObjectMapper转换(Map -> POJO)
|
// 否则使用ObjectMapper转换(Map -> POJO)
|
||||||
ObjectMapper mapper = new ObjectMapper();
|
ObjectMapper mapper = new ObjectMapper();
|
||||||
return mapper.convertValue(requestObj, requestClass);
|
T result = mapper.convertValue(requestObj, requestClass);
|
||||||
|
|
||||||
|
// 自动填充type字段(如果request中没有type,使用外层的type)
|
||||||
|
if (result instanceof com.qqchen.deploy.backend.framework.ssh.websocket.request.SSHBaseRequest) {
|
||||||
|
com.qqchen.deploy.backend.framework.ssh.websocket.request.SSHBaseRequest baseRequest =
|
||||||
|
(com.qqchen.deploy.backend.framework.ssh.websocket.request.SSHBaseRequest) result;
|
||||||
|
if (baseRequest.getType() == null && this.type != null) {
|
||||||
|
baseRequest.setType(this.type);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user