for people who are new to AEM how would anyone explain what is the difference between @AemObject and @SlingObject?
for e.g. :
public abstract class ComponentModel implements AemComponent {
@SlingObject // AND @AemObject
protected Resource resource;
}
my JUnit code which is like
ctx.currentResource("/content/location");
locationsModel = ctx.request().adaptTo(LocationsModel.class);
my JUnit code is working fine if I am using @SlingObject as annotation but not working if @AemObject is being used
please explain me the working of both
Thank you