集成测试失败 - Grails 的自动装配问题
无论出于何种原因,当我尝试运行任何集成测试时,我都会得到以下信息:
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 运行测试。
For whatever reason, when I try to run any integration test, I'm getting the following:
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
Why is CGLib wrapping my injected classes and causing tests to fail? I'm running grails 1.3.6 and running tests through Intelli-J ultimate 10.01.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我重建并重新启动 IntelliJ,一切都很好。
I rebuilt and restarted IntelliJ, and all was well.