Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

AEM: Sling model injection and annotation | AEM Community Blog Seeding

Avatar

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,162 likes

Total Posts

6,273 posts

Correct Reply

1,144 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,162 likes

Total Posts

6,273 posts

Correct Reply

1,144 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile
kautuk_sahni
Community Manager

21-06-2020

BlogImage.jpg

AEM: Sling model injection and annotation by Theo Pendle

Abstract

This article is a response to an article by a connection of mine, Dylan Reniers: https://www.digitalum.eu/2020/06/19/deep-diving-into-sling-models-pt2/. I recommend you read the piece as it has some interesting information and because otherwise the rest of this article won’t make much sense! 😉

In the article, Dylan mentions 4 red flags in Sling Model implementation:
1. Set the defaultInjectionStrategy to optional
2. Use both SlingHttpServletRequest and Resource as adaptables
3. Use @Inject everywhere
4. No name added to the property using @Named

Read Full Blog

AEM: Sling model injection and annotation

Q&A

Please use this thread to ask the related questions.

AEM AEMEBlogSeeding Experience Manager