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

标签 spring grails maven-3

在我的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/

相关文章:

java - EntityManagerFactory 中未指定 PersistenceProvider,并且选择的 PersistenceUnitInfo 未指定基于注释的配置

spring - WebDAV/Spring 集成?

spring - HTTP 状态 [500] - 部署 war 时的 Servlet.init()

json - json响应末尾出现意外 token }

.net - 如何使用Grails调用WCF .net Web服务

grails - grails 中的数据绑定(bind)异常

java - Java-1.8.0_211 和 Maven-3.3.9 导致 AEM-6.3 构建失败

java - Spring Boot JPA/JDBC 批处理 findById 有效,但 findOneByX 不起作用

java - EJB3.0的Servlet 2.5注入(inject),全部打包为WAR

maven - 如何从命令行覆盖 `project.build.finalName` Maven 属性?