Inject In Sling Model

AEM Cloud Service expert skill — migrate javax.inject.@Inject fields in Sling Model (@Model) classes to injector-specific annotations (@ValueMapValue / @OSGiService / @SlingObject). Self-discoverable (scan for @Model classes with field-level @Inject); the replacement is chosen deterministically from each field's declared type. Use for "fix @Inject in HeroModel.java", "modernize my Sling Models", or when scanning an AEM project for @Inject misuse. Detailed decision table, companion-annotation handling, import management, and file-level skip policy are in recipe.md.

Adobe Updated 142 repo stars

File contents

adobe/skills/tree/main/plugins/aem/cloud-service/skills/code-assessment/inject-in-sling-model commit 3480055097

Frequently asked questions

npx skillmds@latest add adobe/inject-in-sling-model-2