gpt4 book ai didi

grails - Spring Security核心插件从1.3.x升级到2.0.4时出错

转载 作者:行者123 更新时间:2023-12-02 15:01:53 25 4
gpt4 key购买 nike

我有一个在grails 1.3.x中开发的应用程序,我已升级到2.0.4,spring安全插件中存在依赖项错误,所以我做了grails install-plugin spring-security-core,它安装了1.2.7.3版本。然后我运行grails应用程序,出现以下错误。

Compilation error: startup failed:
Compile error during compilation with javac.
C:\Users\Vinay.hs\.grails\2.0.4\projects\steer\plugins\spring-security-core-1.2.7.3\src\java\org\codehaus\groovy\grails\plugins\springs
ecurity\AjaxAwareAuthenticationFailureHandler.java:48: cannot find symbol
symbol : method saveException(javax.servlet.http.HttpServletRequest,org.springframework.security.core.AuthenticationException)
location: class org.codehaus.groovy.grails.plugins.springsecurity.AjaxAwareAuthenticationFailureHandler
saveException(request, exception);
^

然后我添加了 compile ':spring-security-core:1.2.7.3'。我有一个不同的错误,如下所示
:::: WARNINGS
::::::::::::::::::::::::::::::::::::::::::::::

:: UNRESOLVED DEPENDENCIES ::

::::::::::::::::::::::::::::::::::::::::::::::

:: #spring-security-core;1.2.7.3: java.text.ParseException: inconsistent module descriptor file found in 'http://plugin
s.grails.org/grails-spring-security-core/tags/RELEASE_1_2_7_3/spring-security-core-1.2.7.3.pom': bad organisation: expected='' found='o
rg.grails.plugins';

::::::::::::::::::::::::::::::::::::::::::::::


:::: ERRORS
grailsCentral: bad organisation found in http://plugins.grails.org/grails-spring-security-core/tags/RELEASE_1_2_7_3/spr
ing-security-core-1.2.7.3.pom: expected='' found='org.grails.plugins'

我引用了 this jira issue,据称我们必须将依赖关系更改为运行时,但这给了我以下错误
    inconsistent module descriptor file found in 'http://plugins.grails.org/grails-spring-security-core/tags/RELEASE_1_2_7_3/spring-security-core-1.2.7.3.pom': bad organisation: expected='' found='org.grails.plugins';

因此,如何解决此问题。

最佳答案

好像您将依赖项放在BuildConfig.groovy dependencies部分中,但应该在plugins部分中:

plugins {
runtime ":hibernate:$grailsVersion"
build ":tomcat:$grailsVersion"
...
compile ':spring-security-core:1.2.7.3'
}

关于grails - Spring Security核心插件从1.3.x升级到2.0.4时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13338824/

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