Gradle compilation cannot search resources resource problem

When I use AbstractProcessor for file generation
javax.tools.StandardLocation.SOURCE_OUTPUT Unable to get files in resources


@AutoService(Processor.class)
public class SpringFactoriesProcessor extends AbstractProcessor {

    protected void generateConfigFiles() {
        Filer filer = processingEnv.getFiler();
        FileObject resource = filer.getResource(StandardLocation.SOURCE_OUTPUT, "", LOCATION);
    }
}

I didn’t get the file in resources, but Maven can get it, I want to know why
What should I do, or is this a bug with Gradle?