@v1101, your code looks accurate, @ScriptVariable
private ResourceResolver resolver; Take a look at this Sling Models Reference Guide, its a good example of how you can inject AEM objects via AEM Sling Model Injectors, https://sourcedcode.com/blog/aem/aem-sling-model-injectors-annotations-re...