This commit is contained in:
Looly
2024-11-18 14:11:59 +08:00
parent 28fff1fbac
commit c738d783c2
15 changed files with 86 additions and 29 deletions

View File

@@ -21,6 +21,8 @@ import org.dromara.hutool.core.lang.Console;
import org.dromara.hutool.core.map.multi.ListValueMap;
import org.dromara.hutool.http.HttpUtil;
import org.dromara.hutool.http.server.engine.sun.SimpleServer;
import org.dromara.hutool.http.server.handler.ServerRequest;
import org.dromara.hutool.http.server.handler.ServerResponse;
/**
* http://localhost:8888/?name=hutool

View File

@@ -2,11 +2,11 @@ package org.dromara.hutool.http.server.engine;
import org.dromara.hutool.core.lang.Console;
import org.dromara.hutool.http.server.ServerConfig;
import org.dromara.hutool.http.server.engine.jetty.Jetty9Engine;
import org.dromara.hutool.http.server.engine.jetty.JettyEngine;
public class JettyTest {
public static void main(String[] args) {
final Jetty9Engine engine = new Jetty9Engine();
final JettyEngine engine = new JettyEngine();
engine.init(ServerConfig.of());
engine.setHandler((request, response) -> {
Console.log(request.getPath());