jamesfredley commented on issue #13574: URL: https://github.com/apache/grails-core/issues/13574#issuecomment-3168246309
The following example project has been updated with the latest Grails 7 changes: https://github.com/jamesfredley/hotswap-demo - this automatically installs and runs the right JDK (only JETBRAINS 17 and 21 work), downloads and installs hotswap-agent.jar from mavenCentral (org.hotswapagent:hotswap-agent:2.0.2) and uses groovyReset.jar. To replicate the exact steps from: https://www.youtube.com/watch?v=Fz_sKuZ-ytg, although you will see more log errors: ``` clone https://github.com/jamesfredley/hotswap-demo ./grailsw create-domain-class Car // manually add String name to Car domain class run-app // view list of controllers on http://localhost:8080/ create-scaffold-controller com.example.Car // view list of controllers on http://localhost:8080/ // you can create a Car and save, view the list, delete etc. ``` But other tasks, while Grails is running, such as adding a domain, adding a new field to a domain do not appear to work without a restart. Adding an action to an existing controller works, just make sure the view exists. ``` ./grailsw run-app // view list of controllers on http://localhost:8080/ create-domain-class Pet // manually add String name to Pet domain class create-scaffold-controller com.example.Pet // view list of controllers on http://localhost:8080/ // click on PetController // Error: Either class [com.example.Pet] is not a domain class or GORM has not been initialized correctly or has already been shutdown. Ensure GORM is loaded and configured correctly before calling any methods on a GORM entity. exit ./grailsw run-app // view list of controllers on http://localhost:8080/ // click on PetController, it works fine ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
