private org.apache.sling.api.resource.Resource were not able to be injected
Hi Team
I am using sling models with sightly. I am trying to inject resource to my model as below. All the models are throwing same error saying Resource was not able to be injected. This was working sometimes before. Now for some reason I am getting this error. Could you please help
@Model(adaptables = Resource.class)
public class PdfDownloadModel {
private final Logger LOG = LoggerFactory.getLogger(getClass());
@Inject
private Resource resource;
ERROR
org.apache.sling.models.impl.ModelAdapterFactory Required properties [private org.apache.sling.api.resource.Resource com.core.pdfdownload.models.PdfDownloadModel.resource] on model class class com.core.pdfdownload.models.PdfDownloadModel were not able to be injected.
Thanks in Advance
Veena
