更改返回标签
This commit is contained in:
@@ -38,8 +38,14 @@ public class retLabelServlet extends HttpServlet {
|
||||
resp.setHeader("Access-Control-Allow-Headers", "access-control-allow-origin, authority, content-type, version-info, X-Requested-With");
|
||||
resp.setContentType("application/json;charset=UTF-8");
|
||||
PrintWriter writer = resp.getWriter();
|
||||
String jsonString = JSONObject.toJSONString(categoryService.retLabel());
|
||||
writer.println(jsonString);
|
||||
if(categoryService.retLabel().size() !=0)
|
||||
{
|
||||
String jsonString = JSONObject.toJSONString(categoryService.retLabel());
|
||||
writer.println(jsonString);
|
||||
}
|
||||
else{
|
||||
writer.println("null");
|
||||
}
|
||||
writer.close();
|
||||
}
|
||||
public void setResult(Integer code, String msg, PrintWriter writer) {
|
||||
|
Reference in New Issue
Block a user