Reloading gsp in deployed application with Grails 4/5

Viewed 113

For many years I have been using the handy facility to be able to make tweaks to GSP files in deployed Grails 2 applications, with grails.gsp.enable.reload = true in config.groovy.

It seems this facility is still here in Grails 4 and now 5, according to the docs. But I cannot get it to work. In Grails 2, the GSPs were available in WEB-INF/grails-app/views, no such directory is present on a deployed Grails 4 or 5 app.

Does this actually work still? Is there some other step I have to do?

1 Answers

As suggested in the comments, configuring "grails.gsp.view.dir" enables GSP reloading. So instead of relying on "WEB-INF/grails-app/views" you just have to handle the source directory yourself. Note to self (and others): Add a trailing slash when configuring this directory!

Related