Grails upgrade from 1.0.5 to 2.4.4

自闭症网瘾萝莉.ら 提交于 2020-01-15 06:59:09

问题


I have a collection of applications written in Grails v1.0.5. The application does work flawlessly. But, I'm looking into the possibility of upgrading to the latest version(2.4.4). I know it is quite a huge leap starting from 1.0.5 but any pointers on where to start? Official site holds documentation only from 1.2.0(makes me feel like I'm in old age). Any help would be much appreciated.


回答1:


The safest way to upgrade an application from 1.x to 2.x would be to create an empty 2.x project, then slowly, by hand, move the following:

  1. Contents of application.properties into BuildConfig.groovy (e.g. install plugins).
  2. Contents of Config.groovy and Resources.groovy (do this by hand not by copying the file)
  3. Tests (copy files)
  4. Domain classes (copy files)
  5. Controllers (copy files)
  6. Services (copy files)
  7. Filters (copy files)
  8. URLMappings.groovy (by hand not by copying the file)

Depending on the size of the applications and complexity this could be very quick, or very painful. One thing to stress. Test, Test, Test.



来源:https://stackoverflow.com/questions/29163287/grails-upgrade-from-1-0-5-to-2-4-4

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