guicedee-inject

Bootstrap GuicedEE applications by scanning modules and creating the Guice injector.

5|Updated Jul 6, 2025
One-click install
npx skills add https://github.com/GuicedEE/ai-rules --skill guicedee-inject
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: guicedee-inject
Source: https://github.com/GuicedEE/ai-rules/tree/main/skills/.system/guicedee-inject
Command: npx skills add https://github.com/GuicedEE/ai-rules --skill guicedee-inject

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Bootstraps GuicedEE applications by automating the wiring of DI, startup/shutdown lifecycles, and centralized logging, reducing boilerplate and configuration drift.

Core Features & Use Cases

  • Classpath scanning and SPI registration to discover modules and services.
  • Guice injector creation and lifecycle orchestration via IGuicePreStartup, IGuiceModule, IGuicePostStartup, IGuicePreDestroy.
  • Centralized logging configuration with Log4j2 using LogUtils or @InjectLogger.
  • JobService pool management and graceful shutdown across services.
  • Module registration for targeted scanning and deterministic startup.

Quick Start

Register modules for scanning and call IGuiceContext.instance().inject() to bootstrap the GuicedEE runtime.

Frequently Asked Questions about guicedee-inject

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I bootstrap a Guice application with dependency injection and lifecycle management?▼

To bootstrap a Guice application with dependency injection and lifecycle management, register modules for classpath scanning and call IGuiceContext.instance().inject(). This wires DI, orchestrates startup/shutdown hooks, and configures centralized logging automatically.

How does classpath scanning and SPI registration work for discovering Guice modules?▼

Classpath scanning and SPI registration discover Guice modules by supporting dual-registration with module-info.java and META-INF/services. This mechanism automatically identifies and wires modules across JVM-based services during application startup.

What is the best way to manage startup and shutdown hooks in a JVM-based service?▼

The best way to manage startup and shutdown hooks in a JVM-based service is using IGuicePreStartup, IGuicePostStartup, and IGuicePreDestroy interfaces. These lifecycle hooks orchestrate deterministic initialization and graceful shutdown across services.

Can I configure centralized logging with Log4j2 in a GuicedEE application?▼

Yes, you can configure centralized logging with Log4j2 in a GuicedEE application by using LogUtils or the @InjectLogger annotation. The bootstrap process applies this logging configuration during application startup.

Does GuicedEE support job pool management and graceful shutdown across services?▼

Yes, GuicedEE supports job pool management and graceful shutdown across services via JobService. It orchestrates these pools during the application lifecycle, ensuring clean resource cleanup through IGuicePreDestroy hooks.