# NettyTest **Repository Path**: song-junyi/netty-test ## Basic Information - **Project Name**: NettyTest - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-06-24 - **Last Updated**: 2026-08-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Netty Server Test Netty 4.1.79 HTTP 服务端,监听 8080 端口,优先使用 epoll_wait (Linux) / KQueue (macOS) 模式。fat jar 包含所有依赖。 ## Build ```bash export MAVEN_OPTS="-Djdk.tls.client.protocols=TLSv1.2" mvn package -DskipTests -Dhttps.protocols=TLSv1.2 ``` ## Run ```bash java --enable-native-access=ALL-UNNAMED -jar target/netty-test-1.0-SNAPSHOT.jar ``` ## Test ```bash curl -X POST -d "hello" http://localhost:8080 ``` 预期输出: ``` [2026-06-25 14:51:01.123] [BUSINESS] 收到HTTP请求,body大小: 5 bytes ``` 响应: `OK 2026-06-25 14:51:01.126` > JDK 26 编译时需 `-Dhttps.protocols=TLSv1.2`,运行时需 `--enable-native-access=ALL-UNNAMED`。Linux 部署时自动使用 epoll_wait。