mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-22 07:00:43 +08:00
feat: support AbstractTranslet packer
This commit is contained in:
@@ -29,6 +29,9 @@ val filesToCopy = objects.fileCollection().from(
|
||||
dependencies {
|
||||
implementation("com.caucho:hessian:4.0.66")
|
||||
implementation("org.yaml:snakeyaml:1.27")
|
||||
implementation("com.alibaba:fastjson:1.2.47")
|
||||
implementation("com.fasterxml.jackson.core:jackson-databind:2.8.0")
|
||||
implementation("xalan:xalan:2.7.2")
|
||||
providedCompile("javax.servlet:javax.servlet-api:3.1.0")
|
||||
testImplementation(libs.junit.jupiter)
|
||||
testRuntimeOnly(libs.junit.platform.launcher)
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.annotation.WebServlet;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* @author ReaJason
|
||||
* @since 2025/11/16
|
||||
*/
|
||||
@WebServlet("/jackson")
|
||||
public class JacksonServlet extends HttpServlet {
|
||||
@Override
|
||||
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
|
||||
String data = req.getParameter("data");
|
||||
new ObjectMapper().enableDefaultTyping().readValue(data, Object.class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user