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
Given a controller unit test that have a service injected with an autowired annotation It throws an exception NoSuchBeanDefinitionException.
I've reproduced the issue on a repository. It's been created with grails version 3.3.11, an item class domain and some code generated with scaffolding. I've left the test working and made the change on ItemController injecting the service with autowired on the last commit.
es.xagani.grailsTestAutowired.ItemControllerSpec > Test the index action returns the correct model FAILED
org.springframework.beans.factory.UnsatisfiedDependencyException at ItemControllerSpec.groovy:18
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException at ItemControllerSpec.groovy:18
The text was updated successfully, but these errors were encountered:
grails version: 3.3.11
Given a controller unit test that have a service injected with an autowired annotation It throws an exception
NoSuchBeanDefinitionException
.I've reproduced the issue on a repository. It's been created with grails version 3.3.11, an item class domain and some code generated with scaffolding. I've left the test working and made the change on ItemController injecting the service with autowired on the last commit.
Git Repository with an example: https://github.com/xavier-gallofre/grails-test-autowired-issue
The text was updated successfully, but these errors were encountered: