Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable Grails 3.x auto-reload?

I am unable to get auto-reloading working on newly created controllers. My application starts correctly but whenever i do grails create-controller <controller-name> the controller is created and i see that the new controller is compiled.

When i try to access the newly generated controller I always get a "Page not Found (404)". After restarting the Grails application, the newly created controller works correctly.

I am using Grails 3.0.1 on OSX Yosimite and Java 1.8.0_31-b13. Any clue on how to fix this?

I am starting the application using the following combinations:

grails run-app
grails -reloading run-app
grails run-app -reloading

None of these worked reloading the new created controller

like image 779
Marco Avatar asked Apr 17 '15 12:04

Marco


1 Answers

Grails introduced what I'd consider a bug in version 2.4.4 and still present in at least 3.0.4, where automatic reloading doesn't work if you have space anywhere in the file's (in this case the controller's) path.

See this post for more details.

like image 54
Brad Mace Avatar answered Nov 19 '22 18:11

Brad Mace