The instance here is not created by spring, hence I don't think spring can automagically set the instance of repository in the groovyObject
that you have.
However, if you can can autowire
the repository into the class thats generating the groovyObject
then you can manually inject the repo in the newInstance
call.
parsedClass.newInstance(repository:your_autowired_repo_ref)