本文介绍了Grails从1.0.5升级到2.4.4的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一批用Grails v1.0.5编写的应用程序。该应用程序的工作完美无瑕。但是,我正在研究升级到最新版本(2.4.4)的可能性。我知道这是从1.0.5开始的巨大飞跃,但是从哪里开始呢?
官方网站只保留1.2.0的文档(让我觉得自己处于年老)。
任何帮助将不胜感激。

解决方案

将应用程序从1.x升级到2的最安全方法。 x将创建一个空的2.x项目,然后手动缓慢地移动以下内容:


  1. 将application.properties的内容 BuildConfig.groovy (例如,安装插件)。 Config.groovy 和 Resources.groovy (手动完成而不是复制文件)
  2. 测试(复制文件)

  3. 域名类别(复制档案)
  4. 控制器(复制档案)
  5. 服务(复制档案)

  6. 过滤器(复制文件)

  7. URLMappings.groovy (手工不要复制文件)

根据应用程序的大小和复杂程度,这可能非常快,或者非常痛苦。有一点要强调。 测试,测试,测试

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.

解决方案

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.

这篇关于Grails从1.0.5升级到2.4.4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 14:24
查看更多