All Products
reactor-guice
Open SourceOSS

reactor-guice

Guice meets Reactor-Netty

A reactive Java microservice framework combining Google Guice with Reactor-Netty. Annotation routing, Mono handlers, WebSocket, static files, HTTPS, and an optional API gateway — reflection only at startup.

com.doopp:reactor-guice

Reactive server architecture

Reactor-Netty owns non-blocking I/O. Guice owns wiring. Publishers route HTTP, WebSocket, static assets, or gateway traffic. Controllers return Mono.

Application

@Controller and @Service with JAX-RS paths — handlers return Mono for reactive composition.

Framework

ReactorGuiceServer scans packages, builds Guice injector, registers routes, then launch().

Publishers

HandlePublisher, WebsocketPublisher, StaticFilePublisher, and ApiGatewayPublisher share one HTTP server.

Infra

Optional MyBatis, Redis, JSON converters, templates, HTTPS, CORS, and URI filters.

Boot sequence

  1. 1ReactorGuiceServer.create().bind(host, port)
  2. 2createInjector + basePackages → scan Controllers / Services
  3. 3setHttpMessageConverter, addResource, addFilter, setHttps…
  4. 4launch() → Reactor-Netty HttpServer with reactive publishers

Core stack

GuiceDependency injection & modules
Reactor-NettyNon-blocking HTTP / WebSocket
Project ReactorMono / reactive pipelines
JAX-RS APIFamiliar routing annotations

Capabilities

Reactive handlers

Controller methods return Mono — compose remote calls, redirects, and Protobuf without blocking threads.

Annotation routing

Startup scan wires @GET/@POST/@PUT/@DELETE/@Path; no manual route tables.

API gateway mode

Optional ApiGatewayDispatcher proxies HTTP and WebSocket as a lightweight gateway.

HTTP + WebSocket

Same server for REST, real-time sockets (incl. Sec-WebSocket-Protocol), and static index.html.

HTTPS & CORS

JKS-based HTTPS and optional cross-origin headers for browser clients.

Maven ready

Published as com.doopp:reactor-guice on Maven Central.

Start with reactor-guice

Add the dependency and launch a reactive Guice + Reactor-Netty service in a few lines.