feat: support scriptEngineJar packer

This commit is contained in:
ReaJason
2025-11-20 00:36:25 +08:00
parent a022968965
commit 5ee604f4a0
25 changed files with 389 additions and 82 deletions
@@ -28,6 +28,7 @@ val filesToCopy = objects.fileCollection().from(
dependencies {
implementation("com.caucho:hessian:4.0.66")
implementation("org.yaml:snakeyaml:1.27")
providedCompile("javax.servlet:javax.servlet-api:3.1.0")
testImplementation(libs.junit.jupiter)
testRuntimeOnly(libs.junit.platform.launcher)
@@ -0,0 +1,22 @@
import org.yaml.snakeyaml.Yaml;
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("/snakeYaml")
public class SnakeYamlServlet extends HttpServlet {
@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
String data = req.getParameter("data");
Yaml yaml = new Yaml();
yaml.load(data);
}
}