diff --git a/inject-kotlin/src/main/kotlin/io/micronaut/kotlin/processing/annotation/KotlinAnnotationMetadataBuilder.kt b/inject-kotlin/src/main/kotlin/io/micronaut/kotlin/processing/annotation/KotlinAnnotationMetadataBuilder.kt index 6bd7ce1ccf..742fe92c87 100644 --- a/inject-kotlin/src/main/kotlin/io/micronaut/kotlin/processing/annotation/KotlinAnnotationMetadataBuilder.kt +++ b/inject-kotlin/src/main/kotlin/io/micronaut/kotlin/processing/annotation/KotlinAnnotationMetadataBuilder.kt @@ -79,6 +79,7 @@ internal class KotlinAnnotationMetadataBuilder( val annotationMirror = getAnnotationMirror(value.annotationName).orElse(null) if (annotationMirror == null) { return ClassUtils.forName(value.annotationName, null) + .or { ClassUtils.forName(value.annotationName, visitorContext::class.java.classLoader) } .map { it -> it.annotations.any { it.annotationClass.java == Repeatable::class.java } } .orElse(false) }