Reactive HTTP/HTTPS server bootstrap for GuicedEE applications using Vert.x 5.
Build high-performance RESTful APIs, WebSocket services, and web applications with dependency injection, automatic lifecycle management, and pluggable SPI configurators. Full support for TLS/HTTPS, static content serving, file uploads, CORS, and authentication.
- π Reactive: Built on Vert.x 5 for non-blocking, high-throughput request handling
- π Dependency Injection: Seamless GuicedEE integration with automatic lifecycle management via
IGuicePostStartup - π Extensible SPI: Three extension points for customizing server options, server instance, and router configuration
- π Security-First: Native support for HTTPS/TLS with JKS and PKCS#12 keystores; pluggable authentication/authorization
- π¦ Zero-Config Defaults: Sensible defaults with environment-based overrides (HTTP, HTTPS, TLS, ports)
- π― Recommended Addons: Leverage GuicedEE dedicated addons for REST, WebSocket, GraphQL, and web services
- π Full Module System: JPMS (Java Module System) compliant with automatic SPI discovery via
ServiceLoader - β Best Practices: Built-in patterns for CORS, file uploads, static content, middleware composition, and error handling
git clone https://github.com/GuicedEE/GuicedVertxWeb.git
cd GuicedVertxWeb
git submodule update --init --recursive # Initialize enterprise rules repositorycp .env.example .env
# Edit .env with your settings (ports, HTTPS keystore, debug flags, etc.)mvn clean verify
mvn exec:java@run # or your IDE's run configurationThe HTTP server starts on port 8080 (HTTPS on 8443 if enabled). Check logs for confirmation.
- RULES.md β Technology stack, deployment standards, and design patterns
- GUIDES.md β How-to guides for common tasks (REST APIs, WebSockets, HTTPS, etc.)
- GLOSSARY.md β Domain terminology with cross-references to enterprise topics
- IMPLEMENTATION.md β Current implementation status and validation approach
- PACT.md β Collaboration agreement and stage approval process
- docs/PROMPT_REFERENCE.md β Stack traceability and prompt loading instructions
- docs/architecture/README.md β Architecture decision records and diagrams
- C4 context, container, and component diagrams
- HTTP request sequence flow
- Server startup sequence
- Entity-relationship diagrams (configuration)
- rules/generative/backend/guicedee/web/README.md β Modular rules index
- spi-configurators.rules.md β SPI interfaces, registration strategies, discovery patterns
- server-configuration.rules.md β HTTP/HTTPS setup, environment variables, TLS/keystore configuration
- router-configuration.rules.md β Router setup, path patterns, request/response handling, middleware
- use-cases.rules.md β Practical implementations with recommended GuicedEE addons
- module-info.rules.md β JPMS configuration for consumers
- lifecycle.rules.md β Startup/shutdown sequences, SPI discovery, dependency injection ordering
- best-practices.rules.md β Best practices, troubleshooting, and debugging tips
- Java 25 LTS β Latest long-term support release
- Maven 3.9+ β Build automation and dependency management
- Vert.x 5 β Reactive, event-driven framework
- GuicedEE Core + Client β Dependency injection and lifecycle management
- JSpecify β Nullness annotations for static analysis
- CRTP Fluent APIs β Type-safe builder patterns without Lombok
- JPMS β Java Module System with automatic SPI discovery
Three extension points for customizing the web server:
VertxHttpServerOptionsConfiguratorβ CustomizeHttpServerOptionsbefore server creation (ports, TLS, compression, etc.)VertxHttpServerConfiguratorβ Configure theHttpServerinstance after creation (WebSocket handlers, metrics, custom bindings)VertxRouterConfiguratorβ Add routes to theRouter(REST endpoints, static content, middleware, error handlers)
Implementations are discovered via ServiceLoader and executed in order. Register via JPMS provides...with or META-INF/services.
VertxWebServerPostStartupimplementsIGuicePostStartupand orchestrates the full server initialization sequence- Automatic lifecycle management: server startup on app startup, graceful shutdown on app exit
- Environment-based configuration via
.envfile or system properties
All configuration is driven by .env file (or system properties/environment). Copy .env.example and customize:
| Variable | Default | Purpose |
|---|---|---|
HTTP_ENABLED |
true |
Enable HTTP server |
HTTP_PORT |
8080 |
HTTP listen port |
HTTPS_ENABLED |
false |
Enable HTTPS server |
HTTPS_PORT |
8443 |
HTTPS listen port |
HTTPS_KEYSTORE |
β | Path to JKS or PKCS#12 keystore file |
HTTPS_KEYSTORE_PASSWORD |
β | Keystore password |
BASE_URL |
β | Public base URL (for absolute links) |
LOG_LEVEL |
INFO |
Logging level (DEBUG, INFO, WARN, ERROR) |
ENABLE_DEBUG_LOGS |
false |
Verbose Vert.x activity logging |
VERTX_EVENT_LOOP_POOL_SIZE |
β | Event loop thread pool size |
VERTX_WORKER_POOL_SIZE |
β | Worker thread pool size |
For secrets management, see rules/generative/platform/secrets-config/env-variables.md.
GuicedVertxWeb auto-detects keystore format by file extension:
.jksβ JKS keystore.pfx,.p12,.p8β PKCS#12 keystore
Generate a self-signed certificate for development:
# JKS keystore
keytool -genkey -alias selfsigned -keyalg RSA -keysize 2048 \
-validity 365 -keystore keystore.jks -storepass changeit
# PKCS#12 keystore
keytool -genkey -alias selfsigned -keyalg RSA -keysize 2048 \
-validity 365 -keystore keystore.p12 -storetype PKCS12 -storepass changeitFor common use cases, GuicedEE provides higher-level addons with automatic features:
- guicedee-rest β REST/CRUD APIs with OpenAPI/Swagger documentation, parameter validation, content negotiation, role-based access control
- guicedee-websocket β WebSocket connections with lifecycle management, message routing, automatic reconnection
- guicedee-webservice β SOAP/XML web services with automatic WSDL generation, MTOM attachments
- guicedee-graphql β GraphQL schemas with automatic introspection, query validation, subscriptions
- GuicedEE Security β Authorization, authentication, RBAC with declarative annotations
See use-cases.rules.md for implementation examples and when to use lower-level Vert.x Web APIs directly.
Continuous integration via GitHub Actions ([.github/workflows/ci.yml](.github/workflows/ci.yml)):
name: Maven Package
on:
workflow_dispatch:
push:
jobs:
GuicedInjection:
uses: GuicedEE/Workflows/.github/workflows/projects.yml@master
with:
baseDir: ''
name: 'Guiced Vert.x Web'
secrets:
USERNAME: ${{ secrets.USERNAME }}
USER_TOKEN: ${{ secrets.USER_TOKEN }}
SONA_USERNAME: ${{ secrets.SONA_USERNAME }}
SONA_PASSWORD: ${{ secrets.SONA_PASSWORD }}Required repository secrets:
USERNAMEβ GitHub username for deploymentsUSER_TOKENβ GitHub personal access tokenSONA_USERNAMEβ Sonatype (Maven Central) usernameSONA_PASSWORDβ Sonatype password
Do not commit secrets. Configure via GitHub repository settings β Secrets and variables β Actions.
Contributions are welcome! Please follow these guidelines:
- Fork & Branch: Create a feature branch (
git checkout -b feature/my-feature) - Follow the Pact: Review PACT.md for collaboration standards and approval stages
- Run Tests:
mvn clean verify(Java 25 required) - Update Rules: If behavior changes, update relevant
.rules.mdfiles inrules/generative/backend/guicedee/web/ - Commit & Push: Descriptive commit messages, push to your fork
- Pull Request: Open a PR with clear description and reference relevant issues
# Build and test locally
mvn clean install
# Run the application
mvn exec:java@run
# Format code
mvn spotless:apply
# Run only tests
mvn test- Current Version: See
pom.xmlfor latest release - Java Compatibility: Java 25 LTS minimum
- Maven Compatibility: Maven 3.9+
- Vert.x Compatibility: Vert.x 5.0+
- Status: Active development with enterprise rules maintained in submodule
This project is licensed under the Apache License 2.0. See LICENSE file for details.