Grails版本从2.4.4升级到2.5.3

我在grails 1.3.7中创建了一个简单的项目。现在我正在执行版本更改的任务。首先,我将1.3.7项目添加到2.4.4。它运行完美。 我已经在我的文件BuildConfig.groovy文件,urlMapping中,index.gsp中,applicationContext.xml中,application.pro perties取得Grails版本从2.4.4升级到2.5.3

 applicationContext.xml 

<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="

http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">

<bean id="grailsApplication" class="org.codehaus.groovy.grails.commons.GrailsApplicationFactoryBean">

<description>Grails application factory bean</description>

<property name="grailsDescriptor" value="/WEB-INF/grails.xml"/>

<!--<property name="grailsResourceLoader" ref="grailsResourceLoader" />-->

</bean>

<bean id="pluginManager" class="org.codehaus.groovy.grails.plugins.GrailsPluginManagerFactoryBean">

<description>A bean that manages Grails plugins</description>

<property name="grailsDescriptor" value="/WEB-INF/grails.xml"/>

<property name="application" ref="grailsApplication"/>

</bean>

<bean id="grailsConfigurator" class="org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator">

<constructor-arg>

<ref bean="grailsApplication"/>

</constructor-arg>

<property name="pluginManager" ref="pluginManager"/>

</bean>

<!--<bean id="grailsResourceLoader" class="org.codehaus.groovy.grails.commons.GrailsResourceLoaderFactoryBean">-->

<!--<property name="grailsResourceHolder" ref="grailsResourceHolder" />-->

<!--</bean>-->

<!--<bean id="grailsResourceHolder" scope="prototype" class="org.codehaus.groovy.grails.commons.spring.GrailsResourceHolder">-->

<!--<property name="resources">-->

<!--<value>classpath*:**/grails-app/**/*.groovy</value>-->

<!--</property>-->

<!--</bean> -->

<bean id="characterEncodingFilter"

class="org.springframework.web.filter.CharacterEncodingFilter">

<property name="encoding">

<value>utf-8</value>

</property>

</bean>

<bean id="conversionService"

class="org.springframework.context.support.ConversionServiceFactoryBean" />

urlMappings

class UrlMappings { 

static mappings = {

"/$controller/$action?/$id?(.$format)?"{

constraints {

// apply constraints here

}

}

"/"(view:"/index")

"500"(view:'/error')

}

}

在指数的变化.gsp文件

 %{--<li>Groovy version:  

${org.codehaus.groovy.runtime.InvokerHelper.getVersion()} </li>--}% to

<li>Groovy version: ${GroovySystem.getVersion()}</li>

现在我试图将它从2.4.4到2.5.3。但是出现了一个错误。

误差

[localhost-startStop-1] ERROR context.GrailsContextLoaderListener - Error 

initializing the application:Error creating bean with name

'defaultGrailsintConverter':

Injection of autowired dependencies failed; nested exception is

org.springframework.beans.factory.BeanCreationException:

Could not autowire field: private

org.springframework.web.servlet.LocaleResolver

org.grails.databinding.converters.web.LocaleAwareNumberConverter.

localeResolver;

请帮我this.Should我编译春季安全插件?

回答:

您可能想要列出您在升级中执行的步骤。你改什么文件,你改变什么相关性等

此外,也有一些博客在那里大约升级。并非所有应用程序都使用相同的Grails块,因此并非所有升级都是相同的。这里有几个: http://totalprogus.blogspot.com/2015/03/upgrade-grails-244-to-250.html http://peedeebeesblog.blogspot.com/2015/06/moving-up-grails-243-to-250.html

最后,Grails的每转有什么可能会在升级过程中需要做提供指令发行说明。这里是2.5.0的注意事项: https://github.com/grails/grails-core/releases/tag/v2.5.0

你的错误看起来并不像Spring Security Plugin,只是Spring注入,虽然有点难以判断格式。

以上是 Grails版本从2.4.4升级到2.5.3 的全部内容, 来源链接: utcz.com/qa/267198.html

回到顶部