When I add Grails Rendering Plugin ( compile "org.grails.plugins:rendering:2.0.1"
) into my dependencies all my SpockUnit test with controllers are getting broken.
The error that I got is:
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
Also I have in my build.gradle file dependency on Spring test: runtime 'org.springframework:spring-test:4.1.7.RELEASE'
. As far as I know this is needed for rendering plugin
Grails version: 3.0.9
Fixed in this issue https://github.com/gpc/rendering/issues/31
Will be merged in version above 2.0.1
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.