Ligero is a Java web framework with zero core dependencies, virtual threads, and an API that gets out of your way.
import com.ligero.Ligero; public class App { public static void main(String[] args) { Ligero app = Ligero.create(8080); app.get("/hello/{name}", ctx -> ctx.json(Map.of("message", "Hello, " + ctx.pathParam("name") + "!"))); app.start(); } }
Every feature is optional. Every default is secure. Every abstraction is leak-proof.
Zero core dependencies. Java 21 virtual threads. Trie-router resolves in ~140ns even with 300+ routes.
Express-inspired handlers. Composable middleware. Error handling without ceremony or boilerplate.
OWASP security headers, request hygiene, CSRF protection. Production-ready from your first route.
Engines, JSON, templates, tracing — all via ServiceLoader. Swap implementations without touching your code.
SSE in core. WebSockets via Jetty. Reactive features without the reactive complexity.
Micrometer metrics, OpenTelemetry tracing, structured logs, and a live devtools dashboard.
Add what you need. Leave the rest.
No XML config. No heavyweight containers. No magic. Just modern Java, the way it should be.