Grails auto-reloading new controller actions

泪湿孤枕 提交于 2019-12-04 07:18:35

I've asked the same question on github repo.

It seems that latest spring-loaded SNAPSHOT is working fine.

But it must be integrated into Grails - maybe in the next release unfortunately :(

Solution that works for me:

1) Versions:

  • IDE: Intellij IDEA 14.1.3
  • JDK: jdk1.7.0_25
  • GRAILS: 2.5.0

2) On BuildConfig.groovy:

grails.reload.enabled = true
grails.project.fork = [
        test: false,
        run: false,
]

3) Originally, my code was compiled on grails 2.4.4, so I upgraded to 2.5.0. I had no problems with the version change with plugins or anything. My guess is this works because it uses later versions of spring-loaded. Steps:

  • set-grails-version 2.5.0
  • clean
  • delete directory work (just to be sure, I don't really know if this is good practice)
  • compile and/or go to number 4

4) Debug Idea with this configuration: run-app -reloading


Works perfect, no forked debug, reloading enabled, no console error after reload and all breakpoints working even after code changes!

candrews

I took the liberty of reporting this issue to Grails.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!