Grails 3.2: Bootstrap.groovy is not executed when run as an executable war/jar file
Ran into an issue yesterday when running my grails application as an executable jar file via the command below in that it wouldn't execute the Bootstrap.groovy file. Here I had some domain objects that were used to populate the database with static data. >java -Dgrails.env=prod -jar build/libs/my-app.war The issue turned out to be that the Bootstrap.groovy file was not under a package name, it was sitting under grails-app init BootStrap.groovy This had to changed to be under a package name grails-app init myapp BootStrap.groovy After this change the BootStrap.groovy file was executed on startup