You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a project where we needed to override the pdfRenderingService behavior slightly, so we added a Grails service extending PdfRenderingService named "FixedPdfRenderingService". This causes an error on startup:
NoUniqueBeanDefinitionException: No qualifying bean of type 'grails.plugins.rendering.pdf.PdfRenderingService' available: expected single matching bean but found 2: renderingPdfRenderingService,fixedPdfRenderingService
It seems that in Grails 3.2.4, plugin service beans get prefixed by the plugin name, so "pdfRenderingService" from the rendering plugin becomes "renderingPdfRenderingService". I'm not sure if this is causing problems with @Autowire directly, or whether having two beans with this type causes a non-unique exception.
Should RenderingTrait specify rendering*Service instead? Is there a different way we should be overriding PdfRenderingService behavior?
The text was updated successfully, but these errors were encountered:
timbonicus
changed the title
NoUniqueBeanDefinitionException with similar service name in Grails 3
NoUniqueBeanDefinitionException with service extending PdfRenderingService in Grails 3
Jan 23, 2017
I have a project where we needed to override the pdfRenderingService behavior slightly, so we added a Grails service extending PdfRenderingService named "FixedPdfRenderingService". This causes an error on startup:
It seems that in Grails 3.2.4, plugin service beans get prefixed by the plugin name, so "pdfRenderingService" from the rendering plugin becomes "renderingPdfRenderingService". I'm not sure if this is causing problems with
@Autowire
directly, or whether having two beans with this type causes a non-unique exception.Should RenderingTrait specify rendering*Service instead? Is there a different way we should be overriding PdfRenderingService behavior?
The text was updated successfully, but these errors were encountered: