AEM Sling Model Injectors Annotations Reference Guide | AEM Community Blog Seeding | Community
Skip to main content
kautuk_sahni
Community Manager
Community Manager
May 18, 2020

AEM Sling Model Injectors Annotations Reference Guide | AEM Community Blog Seeding

  • May 18, 2020
  • 0 replies
  • 3003 views

BlogImage.jpg

AEM Sling Model Injectors Annotations Reference Guide by Sourcedcode

Abstract

The Apache Sling Model enables injector specific annotations which aggregate the standard annotations for each of the available injector, which are: Script Bindings, Value Map, Resource Path, Child Resources, Request Attributes, OSGI Services, Self, and the Sling Object.

Sure we can invoke injectors by the @inject, followed by the @source annotation (with an injector name) as so, @Inject @Source(“script-bindings”), but invoking such injectors introduces many more lines of code which is tedious and repetitive. Using the @inject annotation freely may cause injector collisions.

Available Injectors
@ScriptVariable
@ValueMapValue
@ResourcePath
@ChildResource
@RequestAttribute
@OSGiService
@Self
@SlingObject

Read Full Blog

AEM Sling Model Injectors Annotations Reference Guide

Q&A

Please use this thread to ask the related questions.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.