After i updated my project from Grails 3.1.11 to 3.2.0 the project has stopped working.
When i start proj from IDE, it works fine. But when i pack it to jar and try to run in terminal, BootStrap.groovy does not execute.
What is the problem?
After i updated my project from Grails 3.1.11 to 3.2.0 the project has stopped working.
When i start proj from IDE, it works fine. But when i pack it to jar and try to run in terminal, BootStrap.groovy does not execute.
What is the problem?
I just found an issue on GitHub. Now BootStrap.groovy and UrlMappings.groovy should be in the default package
Default package is indicated in application.yml
grails:
codegen:
defaultPackage: com.example.app
Migration docs has no information about this issue yet..
sergey Linnik's answer is correct the Bootstrap.groovy file should be in a default package, but lookout when using a IDE (in my case Intellij 2016.2.4) for refactoring the Bootstrap.groovy class from the init folder to a default package that it adds
package default //ensure the package folder is added
class BootStrap {///}
Otherwise when building the grails application it moves the Bootstrap.groovy file out of the default package again because the refactoring didn't update it. Not sure if it's an intellij bug or not..