gpt4 book ai didi

spring - grails maven-function-test执行失败

转载 作者:行者123 更新时间:2023-12-02 16:02:35 27 4
gpt4 key购买 nike

在我的grails应用程序上运行mvn clean install时出现此异常。

Grails版本2.4.4

Failed to execute goal org.grails:grails-maven-plugin:2.4.4:maven-functional-test (default-maven-functional-test) on project nrm: Execution default-maven-functional-test of goal org.grails:grails-maven-plugin:2.4.4:maven-functional-test failed: java.lang.reflect.InvocationTargetException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cache.interceptor.CacheInterceptor#0': Cannot resolve reference to bean 'customCacheKeyGenerator' while setting bean property 'keyGenerator'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customCacheKeyGenerator': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [grails.plugin.cache.CustomCacheKeyGenerator]: Constructor threw exception; nested exception is java.lang.RuntimeException: java.lang.ClassNotFoundException: org.springframework.cache.interceptor.SimpleKeyGenerator

另外,当我在tomcat上部署应用程序时,也会发生此错误。

我的BuildConfig:
dependencies {
// specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes e.g.
runtime 'mysql:mysql-connector-java:5.1.29'
// runtime 'org.postgresql:postgresql:9.3-1101-jdbc41'
test "org.grails:grails-datastore-test-support:1.0.2-grails-2.4"
compile 'org.hibernate:hibernate-ehcache:4.3.5.Final'
compile 'org.springframework:spring-context:4.0.5.RELEASE'

}

plugins {
// 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.8'
compile ":asset-pipeline:1.9.9"
compile ":mail:1.0.7"
compile ":mongo-file:1.4.1"
compile ":mongodb:3.0.2"

compile ':spring-security-core:2.0-RC4'
compile ":spring-security-ui:1.0-RC2"

// plugins needed at runtime but not for compilation
runtime ":hibernate4:4.3.5.5"
runtime ":database-migration:1.4.0"
runtime ":jquery:1.11.1"
}

最佳答案

在下面添加您的pom.xml依赖项:

<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-core</artifactId>
<version>4.0.0.M3</version>
</dependency>

关于spring - grails maven-function-test执行失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29072217/

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