2017-02-10 127 views
0

我正在将应用从Grails v2升级到v3。 我已经达到了与Grails 3.0.17合作良好的程度。 我想升级到v3.1或v3.2。但在gradle.properties改变后的版本,这就是我在执行grails run-app后得到:将Grails从v3.0升级到v3.1或v3.2

[email protected]:[~/](feature/grails3-migration) : grails run-app 
| Error Error occurred running Grails CLI: startup failed: 
script14867378818131525390840.groovy: 3: unable to resolve class xxx.yyy.CollectorsJob 
@ line 3, column 1. 
    import xxx.yyy.jobs.CollectorsJob 
^

script14867378818131525390840.groovy: 6: unable to resolve class xxx.yyy.domain.business.Company 
@ line 6, column 1. 
    import xxx.yyy.domain.business.Company 
^

script14867378818131525390840.groovy: 5: unable to resolve class xxx.yyy.domain.access.User 
@ line 5, column 1. 
    import xxx.yyy.domain.access.User 
^
... 

有这样的印刷约15错误。

这里有什么问题?我试过clear这个项目,并且改变了1.8 - > 1.7的jdk版本。每次都有相同的结果。

回答

1

如果在grails-app/conf/application.groovy引用的应用程序类,这些都需要在grails-app/conf/runtime.groovy

application.groovy文件由生成系统,除了运行时间解析被转移到你的运行配置,不能包含对那些类的引用尚未编译

+0

谢谢!这显然是问题所在。当然,现在我可以看到Grails 3.2迁移指南中提到的不在3.1中。 – Kuba