Skip to content

Grails 7: Controller hotswap change doesn't take effect.  #13669

@arjangch

Description

@arjangch

Expected Behavior

In grails 5, I can hot change actions in controllers. It will show the result of my changes after auto re-compile.

Actual Behaviour

Grails 7 auto re-compiles but still runs old code.
There won't be any changes until I stop Grails 7 and start it again.

Steps To Reproduce

  1. Go to https://start.grails.org/ and download Grails 7 M1 project
  2. cd inside directory
  3. ./gradlew bootRun
  4. Stop the app
  5. ./grailsw create-domain-class com.example.Student
  6. ./grailsw generate-all com.example.Student
  7. ./gradlew bootRun
  8. Stop the app again
  9. Edit grails-app/controllers/com/example/StudentController.groovy
  10. add this line to index action println '======grails 7====print 1========'
  11. in browser go to http://localhost:8080/student/index and click on com.example.StudentController
  12. You will see this in console ======grails 7====print 1========
  13. Do not stop the app. Edit grails-app/controllers/com/example/StudentController.groovy and change print to println '======grails 7====print 2========'`
  14. After auto recompile, go to http://localhost:8080/student/index and click on com.example.StudentController
  15. You will see ex in console ======grails 7====print 1========

Expected

Expected to see ======grails 7====print 2========

Actual

But actually is printed is ======grails 7====print 1========

Environment Information

  • Mac OS
  • java=22.0.2-zulu
    gradle=8.10
    groovy=4.0.22

Example Application

No response

Version

grails=7.0.0-SNAPSHOT

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions