【发布时间】: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