Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
check if bean of type ResourceLoader exists (#906)
* check if bean of type ResourceLoader exists Core upate to test 4.1.0 fails with: ``` io.micronaut.context.exceptions.NoSuchBeanException: No bean of type [io.micronaut.core.io.ResourceLoader] exists. Make sure the bean is not disabled by bean requirements (enable trace logging for 'io.micronaut.context.condition' to check) and if the bean is enabled then ensure the class is declared a bean and annotation processing is enabled (for Java and Kotlin the 'micronaut-inject-java' dependency should be configured as an annotation processor). at io.micronaut.context.DefaultBeanContext.newNoSuchBeanException(DefaultBeanContext.java:2773) at io.micronaut.context.DefaultApplicationContext.newNoSuchBeanException(DefaultApplicationContext.java:304) at io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(DefaultBeanContext.java:2735) at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:1729) at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:856) at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:848) at io.micronaut.test.support.sql.TestSqlAnnotationHandler.handle(TestSqlAnnotationHandler.java:66) at io.micronaut.test.extensions.AbstractMicronautExtension.afterTestMethod(AbstractMicronautExtension.java:232) at io.micronaut.test.extensions.spock.MicronautSpockExtension.lambda$visitSpecAnnotation$0(MicronautSpockExtension.java:85) at org.spockframework.runtime.extension.MethodInvocation.proceed(MethodInvocation.java:101) at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) at org.spockframework.runtime.model.MethodInfo.invoke(MethodInfo.java:156) ``` * Extract method to reduce nesting --------- Co-authored-by: Tim Yates <[email protected]>
- Loading branch information