Groovy & Grails Israel user group meetup is up and running…

Groovy & Grails Israel User Group
Groovy & Grails Israel User Group

just establish today the new meetup group for the groovy & Grails community in Israel
so: “Meet other Groovy and Grails developers and share knowledge. We will talk about code, architecture, performance, testing, deployment & hosting. The group is Both for beginners and pros.”

please join in: http://www.meetup.com/Groovy-Grails-Israel-Meetup-Group/

Running bootstrap with Grails Console

you want to test or check your domain model after setting your environment or creating some data on the bootStrap:

How to run the bootstrap from Grails console and set the ApplicationContext and the grailsApplication

from the Grails documentation:

Starts the Grails console, which is an extended version of the regular Groovy console. There are a couple of useful variables registered in the binding:
ctx – The Spring ApplicationContext instance
grailsApplication – The GrailsApplication instance

if you are using the ‘GrailsApplication’ in your bootstrap implement a setter for the grailsApplication
like:

def setGrailsApplication = { grailsApp->
        grailsApplication = grailsApp
}

on the console write:

def b = new BootStrap()
b.setGrailsApplication(grailsApplication)
b.init(ctx.servletContext)

and now you can write and run your code...