I am trying to use GroovyShellGrails to evaluate some code fragments, but it seems to me to have access to our Grails domain classes. For example, when I try to evaluate something like this:
GroovyShell
Eval.me("my.package.MyDomainClass.get(1)")
I see this error:
groovy.lang.MissingPropertyException: No such property: my for class: Script1
Any thoughts on how I can make this work?
Thank.
, . GroovyShell script , Grails . , , , Grails (, grails console):
grails console
def shell = new GroovyShell(this.class.classLoader) shell.evaluate("my.package.MyDomainClass.get(1)")
Source: https://habr.com/ru/post/1785904/More articles:Passing the value of the function structure - casp.net С# pdf-генератор, который работает на средстве доверия - c#GWT and Jersey Integration - restQuestion about tuning Java IO performance - javaToo many garbage problems in Java - javaHow to manipulate / return data with dynamically loaded functions (dlopen)? - c ++ASP.NET MVC: how can IPrincipal be null? - c #Skype Log Analysis - regexConnect WinDbg to start the process from HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Run at login? - c #HTML - Screenshot and insert into email - htmlAll Articles