This commit is contained in:
@@ -16,7 +16,6 @@ import java.lang.reflect.Method;
|
|||||||
import java.nio.*;
|
import java.nio.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.*;
|
import java.util.concurrent.*;
|
||||||
import java.util.logging.*;
|
|
||||||
import jdk.internal.org.objectweb.asm.*;
|
import jdk.internal.org.objectweb.asm.*;
|
||||||
import static jdk.internal.org.objectweb.asm.ClassWriter.COMPUTE_FRAMES;
|
import static jdk.internal.org.objectweb.asm.ClassWriter.COMPUTE_FRAMES;
|
||||||
import static jdk.internal.org.objectweb.asm.Opcodes.*;
|
import static jdk.internal.org.objectweb.asm.Opcodes.*;
|
||||||
@@ -31,8 +30,6 @@ import org.redkale.service.RetResult;
|
|||||||
*/
|
*/
|
||||||
public abstract class HttpBaseServlet extends HttpServlet {
|
public abstract class HttpBaseServlet extends HttpServlet {
|
||||||
|
|
||||||
protected final Logger logger = Logger.getLogger(this.getClass().getSimpleName());
|
|
||||||
|
|
||||||
public static final int RET_SERVER_ERROR = 1800_0001;
|
public static final int RET_SERVER_ERROR = 1800_0001;
|
||||||
|
|
||||||
public static final int RET_METHOD_ERROR = 1800_0002;
|
public static final int RET_METHOD_ERROR = 1800_0002;
|
||||||
@@ -100,18 +97,6 @@ public abstract class HttpBaseServlet extends HttpServlet {
|
|||||||
|
|
||||||
private Map.Entry<String, Entry>[] actions;
|
private Map.Entry<String, Entry>[] actions;
|
||||||
|
|
||||||
/**
|
|
||||||
* 异常输出
|
|
||||||
*
|
|
||||||
* @param req HTTP请求对象
|
|
||||||
* @param resp HTTP响应对象
|
|
||||||
* @param exp 异常
|
|
||||||
*/
|
|
||||||
protected void sendExceptionResult(HttpRequest req, HttpResponse resp, Throwable exp) {
|
|
||||||
logger.log(Level.SEVERE, "request = " + req, exp);
|
|
||||||
resp.finishJson(new RetResult(RET_SERVER_ERROR, "Server Error"));
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean preExecute(HttpRequest request, HttpResponse response) throws IOException {
|
public boolean preExecute(HttpRequest request, HttpResponse response) throws IOException {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user