问题无法从Grails的2.3.4升级到2.4.3 - 无法找到GrailsResourceLoaderFactoryBean
我想通过这个链接 以下说明从2.3.4一个Grails应用程序升级至2.4.3 http://grails.org/doc/2.4.3/guide/upgradingFrom23.html
我似乎无法完成它。我在编译时找不到GrailsResourceLoaderFactoryBean初始化错误。据我所知,grails 2.4中不再存在,但它仍然需要它。我确信我的applicationContext.xml与全新项目中生成的完全一样,并且错误仍然存在。
我曾尝试
1/Grails的设置的grails-版本2.4.3这个更新的应用程序属性
2 /然后加入下列到我BuildConfig
// plugins for the build system only
build ":tomcat:7.0.55"
// plugins for the compile step
compile ":scaffolding:2.1.2"
compile ':cache:1.1.7'
compile ":asset-pipeline:1.9.6"
compile ":mail:1.0.7"
compile ':spring-security-core:2.0-RC3'
compile ":spring-security-ldap:2.0-RC2"
compile ":spring-security-ui:1.0-RC2"
compile ":cache-headers:1.1.7"
// Uncomment these (or add new ones) to enable additional resources capabilities
runtime ':hibernate4:4.3.5.2' // or ':hibernate:3.6.10.14'
runtime ':database-migration:1.4.0'
runtime ':jquery:1.11.0.2'
runtime ':resources:1.2.13'
runtime ":zipped-resources:1.0"
runtime ":cached-resources:1.0"
3 /我也从我的applicationContext.xml中删除了这行代码
<property name="grailsResourceLoader" ref="grailsResourceLoader" />
4 /我还删除了userprofile.grails \ 2.4.3 \ projects下的项目,然后执行grails刷新依赖项,但仍然没有运气!
看看堆栈跟踪:
”这在官方升级文档中缺少。“ - 在官方升级文档中提到。 http://grails.org/doc/latest/guide/upgradingFrom23.html中的注释包括以下内容:“web-app/WEB-INF/applicationContext.xml文件包含grailsResourceLoader bean的bean定义,它是一个实例org.codehaus.groovy.grails.commons.GrailsResourceLoaderFactoryBean。该bean定义需要从文件中删除。“ – 2014-10-18 12:36:57
看到https://github.com/grails/grails-doc/commit/9bfd17397b8572ea4ca021ebde67fe7c185ee238#diff-42e722eb2e80076bbbfab0562da2dc62R20 – 2014-10-18 12:43:27
是的,你是对的,但既然你显示了“grailsApplication”bean前后的屏幕截图,我认为它会有最好还是明确地添加一行xml以便随着文本一起被删除,当你阅读时可能很快会很容易被忽视。再次,不用担心,我应该从过去的Spring开发中了解更多,但有时在工作中发生的其他事情很容易被忽视。 – Viriato 2014-10-18 18:57:55