How to rerun BootStrap with grails without restarting server?

You can do this with the console plugin. It is useful for running ad-hoc code inside a running server.

To rerun your BootStrap init closure, browse to the web-based console at http://localhost:8080/appname/console. Enter the following in the console:

def servletCtx = org.codehaus.groovy.grails.web.context.ServletContextHolder.servletContext
def myBootstrapArtefact = grailsApplication.getArtefacts(‘Bootstrap’)[-1]
myBootstrapArtefact.referenceInstance.init(servletCtx)


 

ProsperaSoft offers Grails development solutions. You can email at info@prosperasoft.com to get in touch with ProsperaSoft Grails experts and consultants.

Leave a Reply

Your email address will not be published. Required fields are marked *


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>