test: use annotation to simplify register servlet

This commit is contained in:
ReaJason
2025-02-19 22:21:17 +08:00
parent 8bb3158fe6
commit 7d567beba9
27 changed files with 47 additions and 1149 deletions
@@ -2,6 +2,7 @@ package jakarta;
import jakarta.servlet.ServletException;
import jakarta.servlet.annotation.MultipartConfig;
import jakarta.servlet.annotation.WebServlet;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
@@ -22,6 +23,7 @@ import java.nio.file.Files;
maxFileSize = 1024 * 1024 * 5,
maxRequestSize = 1024 * 1024 * 5 * 5
)
@WebServlet("/upload")
public class UploadServlet extends HttpServlet {
private static final String UPLOAD_DIRECTORY = "/";