This commit is contained in:
Redkale
2020-06-10 20:37:24 +08:00
parent 88657fdf63
commit 95fd147268
2 changed files with 7 additions and 1 deletions

View File

@@ -63,6 +63,11 @@ public class HttpMessageResponse extends HttpResponse {
finishHttpResult(new HttpResult(obj == null ? "" : obj));
}
@Override
public void finish404() {
finish(404, null);
}
@Override
public void finish(int status, String message) {
if (this.message.isEmptyResptopic()) return;

View File

@@ -82,7 +82,8 @@ public class HttpServlet extends Servlet<HttpContext, HttpRequest, HttpResponse>
return;
}
}
throw new IOException(this.getClass().getName() + " not found method for URI(" + request.getRequestURI() + ")");
response.finish404();
//throw new IOException(this.getClass().getName() + " not found method for URI(" + request.getRequestURI() + ")");
}
};