Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check if bean of type ResourceLoader exists #906

Merged
merged 2 commits into from
Dec 1, 2023
Merged

Conversation

sdelamo
Copy link
Contributor

@sdelamo sdelamo commented Dec 1, 2023

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)

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)
```
@sdelamo sdelamo requested a review from timyates December 1, 2023 14:18
@sdelamo sdelamo changed the base branch from master to 4.1.x December 1, 2023 14:18
@sdelamo sdelamo added the type: improvement A minor improvement to an existing feature label Dec 1, 2023
Copy link

sonarcloud bot commented Dec 1, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

44.4% 44.4% Coverage
0.0% 0.0% Duplication

@sdelamo sdelamo merged commit 0ad6b0e into 4.1.x Dec 1, 2023
14 checks passed
@sdelamo sdelamo deleted the check-if-resource-loader branch December 1, 2023 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: improvement A minor improvement to an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants