我请求后返回的结果,路径中多带了“\”
{
"ok": true,
"code": "query_ok",
"msg": "查询成功",
"attr": {
"data": "D:\java\eclipse_workspace\nutz\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\raiis\rs\appversionsUbuntu20170825143355.deb"
}
}
9 回复
@At("/path")
@GET
public Object download(@Param("path") String relativePath) {
try {
String fullPath = path + relativePath;
HashMap<String, Object> hs = new HashMap<String, Object>();
hs.put("data", fullPath);
log.info("获取版本路径成功!");
return ResponseEnum.QUERY_OK.attr(hs);
} catch (Exception e) {
e.printStackTrace();
log.error("获取版本路径失败!");
return ResponseEnum.QUERY_FAIL.res();
}
}
麻烦大神了
{
"ok": true,
"code": "query_ok",
"msg": "查询成功",
"attr": {
"data": "D:\\java\\eclipse_workspace\\nutz\\.metadata\\.plugins\\org.eclipse.wst.server.core\\tmp1\\wtpwebapps\\raiis\\rs\\appversionsUbuntu20170825143355.deb"
}
}
添加回复
请先登陆