Gutty
When Guice meets Netty
A lightweight Java server framework that pairs Guice dependency injection with Netty networking — Spring-like annotations, package scanning, HTTP + WebSocket, and optional MyBatis / Redis / templates.
Server architecture
Netty owns I/O. Guice owns wiring. Dispatcher owns routing. Your code stays in Controllers and Socket handlers.
Application
@Controller, @Service, and @Socket — JAX-RS style routes with Guice injection.
Framework
Gutty scans packages, binds components, registers routes, then starts Netty.
Network
One pipeline for HTTP, WebSocket upgrade, and static files on the same event loop.
Infra
Optional MyBatis, Redis, JSON converters, and Freemarker / Thymeleaf via Guice modules.
Boot sequence
- 1loadProperties → setBasePackages → converters / filters / modules
- 2Scan @Service / @Controller / @Socket and bind them in Guice
- 3Map @Path + HTTP methods (or WebSocket handlers) into Dispatcher
- 4Netty pipeline: WebSocket → HTTP → static files
Core stack
Capabilities
Annotation routing
Startup package scan wires @GET/@POST/@Path for HTTP and @Socket for long-lived connections.
Auto parameter binding
Inject query, path, form, cookie, file, JSON, and Protobuf arguments into handlers.
HTTP + WebSocket
Short requests and real-time frames share one Netty server with JSON / Protobuf codecs.
URI filters
Attach filters by path prefix for auth, session attributes, and cross-cutting logic.
Views & JSON
Freemarker / Thymeleaf templates or Jackson / Gson — choose with @Produces.
Maven ready
Published as com.doopp:gutty on Maven Central for drop-in use.
Start with Gutty
Add the dependency and spin up a Netty + Guice server in a few lines.