How to get current application environment in Grails scripts to be able to work with classes and objects like grails console
does.
My script:
import security.User
List users = User.list()
users.each { User user ->
print(user.name)
}
And I get an error:
my-script.groovy: 1: unable to resolve class security.User
All other manipulations from Creating an instance of a domain class inside a grails script also does not help.
I see many grails docs are stale and inconsistent.