Access Grails domain class from GroovyShell script
- by Martin Dow
I'm trying to use GroovyShell to evaluate some snippets of code from within a Grails application, but I don't seem to be able to access our Grails domain classes. For example when I try to evaluate something like this:
Eval.me("my.package.MyDomainClass.get(1)")
I see an error like this:
groovy.lang.MissingPropertyException: No such property: my for class: Script1
Any thoughts on how I can get this to work?
Thanks.