gpt4 book ai didi

spring - 将Grails应用程序从1.3.7升级到2.4.1

转载 作者:行者123 更新时间:2023-12-02 14:14:56 24 4
gpt4 key购买 nike

我试图在不重新学习Grails的情况下实现巨大的飞跃。我有一个网站正试图从Grails 1.3.7升级到Grails 2.4.1。

有趣的是,一旦我将Grails版本设置为2.4.1,就会发生以下情况,

| Installed plugin database-migration-1.4.0.....
> You currently already have a version of the plugin installed [jquery-1.6.1.1]. Do you want to upgrade to [jquery-1.11.1]? [y,n] y
| Installed plugin jquery-1.11.1.....
> You currently already have a version of the plugin installed [tomcat-1.3.7]. Do you want to upgrade to [tomcat-7.0.54]? [y,n] y
| Uninstalled plugin [yui]
| Uninstalled plugin [spring-security-core]
| Uninstalled plugin [searchable]
| Uninstalled plugin [rendering]
| Uninstalled plugin [recaptcha]
| Uninstalled plugin [quartz]
| Uninstalled plugin [mail]
| Uninstalled plugin [jquery-ui]
| Uninstalled plugin [hibernate]
| Uninstalled plugin [google-analytics]| Uninstalled plugin [famfamfam]
| Uninstalled plugin [email-confirmation]
| Uninstalled plugin [cloud-foundry]
| Compiling 131 source files

大量插件已卸载。挖掘发现了一组新的BuildConfig插件参数。我天真地添加了核心Spring安全性插件,如下所示:
plugins {
// plugins for the build system only
build ":tomcat:7.0.54"

// plugins for the compile step
compile ":scaffolding:2.1.1"
compile ':cache:1.1.6'
compile ":asset-pipeline:1.8.11"
compile ":spring-security-core:2.0-SNAPSHOT"

// plugins needed at runtime but not for compilation
runtime ":hibernate4:4.3.5.4" // or ":hibernate:3.6.10.16"
runtime ":database-migration:1.4.0"
runtime ":jquery:1.11.1"

// Uncomment these to enable additional asset-pipeline capabilities
//compile ":sass-asset-pipeline:1.7.4"
//compile ":less-asset-pipeline:1.7.0"
//compile ":coffee-asset-pipeline:1.7.0"
//compile ":handlebars-asset-pipeline:1.3.0.3"
}

似乎已安装插件,因为我现在看到以下提示:
*******************************************************
* You've installed the Spring Security Core plugin. *
* *
* Next run the "s2-quickstart" script to initialize *
* Spring Security and create your domain classes. *
* *
*******************************************************

但是,我仍然看到以下编译错误:
| Compiling 47 source files
[groovyc] org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
[groovyc] /Users/myusername/Development/protocols/src/groovy/com/mycompany/web/protocols/UserProfileDetails.groovy: 3: unable to resolve class org.codehaus.groovy.grails.plugins.springsecurity.GrailsUser
[groovyc] @ line 3, column 1.
[groovyc] import org.codehaus.groovy.grails.plugins.springsecurity.GrailsUser
[groovyc] ^
[groovyc]
[groovyc] /Users/myusername/Development/protocols/src/groovy/com/mycompany/web/protocols/UserProfileUtils.groovy: 3: unable to resolve class org.codehaus.groovy.grails.plugins.springsecurity.GormUserDetailsService
[groovyc] @ line 3, column 1.
[groovyc] import org.codehaus.groovy.grails.plugins.springsecurity.GormUserDetailsService
[groovyc] ^
[groovyc]
[groovyc] /Users/myusername/Development/protocols/grails-app/controllers/LoginController.groovy: 5: unable to resolve class org.codehaus.groovy.grails.plugins.springsecurity.SpringSecurityUtils
[groovyc] @ line 5, column 1.
[groovyc] import org.codehaus.groovy.grails.plugins.springsecurity.SpringSecurityUtils
[groovyc] ^

我已经看过Grails 2.0和更高版本的发行说明,但我仍在寻找应该开始学习如何解开应用程序插件升级的确切点。

最佳答案

看来我在想这个。现在,它看起来就像更改 namespace 一样简单。 Spring Security核心插件类不再以包名开头,

org.codehaus.groovy.grails.plugins.springsecurity    

他们已移至新的根软件包名称,
grails.plugin.springsecurity

关于spring - 将Grails应用程序从1.3.7升级到2.4.1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24437231/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com