Constructor injection is the right default for Spring, but a lot of legacy code still leans on field injection and nullable optionals. This skill walks you through separating mandatory from optional collaborators, using ObjectProvider for conditional features, and applying @Primary and @Qualifier only when you actually need them. The wiring validation section is solid: start with a minimal context test to catch bean problems before you write business logic. The no-op fallback pattern for optional dependencies is cleaner than sprinkling null checks everywhere. If you're refactoring services or onboarding someone who keeps reaching for @Autowired on fields, this gives you a concrete playbook.
npx skills add https://github.com/giuseppe-trisciuoglio/developer-kit --skill spring-boot-dependency-injection