
spring-boot-dependency-injection
Provides dependency injection patterns for Spring Boot projects
by giuseppe-trisciuoglioFree
Description
Spring Boot dependency injection is an agent skill for wiring beans in Spring Boot projects in a constructor-first way. Mandatory collaborators are passed through the constructor, while optional ones are handled with ObjectProvider or no-op fallbacks, so the code does not depend on null checks. When several beans share a type, the skill explains how to choose between them with @Primary and @Qualifier. It also gives a way to check the wiring with minimal context tests before running the full application. The skill applies when creating a new service, component, repository or configuration class, when replacing field injection in older code, when resolving circular dependencies, or when a context fails to start. It also helps prepare classes for plain constructor-based unit tests. It is a guide for the code the agent writes in your Spring project.…
Highlights
- Constructor-first injection
- Optional collaborators via ObjectProvider
- Bean selection with @Primary and @Qualifier
- Minimal context tests for wiring
- Replacing field injection in legacy code
Ratings & Reviews
No ratings yet
Be the first to rate spring-boot-dependency-injection.
People also visit

spring-boot-openapi-documentation
Provides patterns to generate comprehensive REST API documentation
spring-boot-dependency-injection FAQ
What does the spring-boot-dependency-injection skill change?
The way beans receive their dependencies, moving to constructor injection and clear rules for optional and duplicate beans.
How do I install it?
Run npx skills add https://github.com/giuseppe-trisciuoglio/developer-kit --skill spring-boot-dependency-injection.
Does it help with circular dependencies?
Yes. The skill includes reviewing circular dependencies and brittle context startup failures.
Has the skill been security audited?
Yes. Gen Agent Trust Hub shows Pass, Socket shows Pass and Snyk shows Pass.
What are the best spring-boot-dependency-injection alternatives?
Popular alternatives to spring-boot-dependency-injection include spring-boot-project-creator, spring-boot-engineer and create-spring-boot-java-project. See all spring-boot-dependency-injection alternatives






