使用Grails Rendering Plugin时没有布线bean

时间:2016-04-19 14:23:22

标签: spring grails

当我将Grails渲染插件(compile "org.grails.plugins:rendering:2.0.1")添加到我的依赖项中时,所有带控制器的SpockUnit测试都会被破坏。

我得到的错误是:

Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [grails.plugins.rendering.image.PngRenderingService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:1301)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1047)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:942)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:533)
    ... 38 more

此外,我的build.gradle文件依赖于Spring测试:runtime 'org.springframework:spring-test:4.1.7.RELEASE'。据我所知,这是渲染插件所需要的

Grails版本: 3.0.9

1 个答案:

答案 0 :(得分:0)

已修复此问题https://github.com/gpc/rendering/issues/31

将在2.0.1以上的版本中合并