【问题标题】:Integration tests fail - autowiring issue with Grails集成测试失败 - Grails 的自动装配问题
【发布时间】:2011-06-19 17:37:55
【问题描述】:

无论出于何种原因,当我尝试运行任何集成测试时,都会得到以下结果:

Initialization of bean failed; nested exception is 
org.springframework.beans.ConversionNotSupportedException: Failed to convert property     
value of type    
'myproject.provider.shipping.variable.ConcreteImplService$$EnhancerByCGLIB$$f28ea3b8' to 
required type 'ammoscanner.provider.shipping.variable.ConcreteImplService' for property 
'concreteImplService'; nested exception is java.lang.IllegalStateException: Cannot 
convert value of type

为什么 CGLib 会包装我注入的类并导致测试失败?我正在运行 grails 1.3.6 并通过 Intelli-J Ultimate 10.01 运行测试。

【问题讨论】:

  • 在运行应用程序或战争中运行相同的代码时是否有效?另外,您在应用中使用了哪些插件?
  • 也尝试从命令行运行以消除 IntelliJ 作为变量。
  • 运行应用程序并作为战争工作正常。

标签: grails groovy integration-testing autowired cglib


【解决方案1】:

我重建并重新启动了 IntelliJ,一切都很好。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-06-14
    • 2011-12-29
    相关资源
    最近更新 更多