Valid AD0-E123 Dumps shared by ExamDiscuss.com for Helping Passing AD0-E123 Exam! ExamDiscuss.com now offer the newest AD0-E123 exam dumps, the ExamDiscuss.com AD0-E123 exam questions have been updated and answers have been corrected get the newest ExamDiscuss.com AD0-E123 dumps with Test Engine here:
A developer is using a Sling Model to apply some business logic to the values stored in the JCR before outputting them to the page, and all injected fields are optional for this model. What is the proper way to apply this behavior on the class level?
Correct Answer: A
In Sling Models, the@DefaultInjectionStrategyannotation is used to specify the strategy for injecting fields into the model. When setting it toDefaultInjectionStrategy.OPTIONAL, it indicates that all injected fields in the Sling Model are optional and the model will not fail to instantiate if a field cannot be injected. This is a class-level annotation that affects the default injection behavior of all fields within the Sling Model. Option B is incorrect becauserequiredInjectionStrategyis not a valid annotation property in Sling Models. Option C is incorrect becauseinjectionStrategyis not specified at the class level; it is used on the field level with the@Injectannotation.