Micronaut : No bean introspection available for external class

63 Views Asked by At

Introspection error while trying to import class from external lib.

Steps to reproduce : Using a common DTO from a shared lib which has micronaut annotation processing enabled.

@Data
@Serdeable.Deserializable
public class HeaderABC {
  private Map<String, Object> headerAttrib;
}

The serviceHeader from the lib is imported in the micronaut project.

@Data
@Serdeable.Deserializable
@JsonIgnoreProperties(ignoreUnknown = true)
public class RequestA {
  Header header;
}

While trying to run the application, we are getting No bean introspection available for external class. [Header] which is dependent lib.

Internal Server Error: No bean introspection available for type [class HeaderABC]. Ensure the class is annotated with io.micronaut.core.annotation.Introspected

Below changes didn't help fix it.

  • Adding @Introspected in HeaderABC

  • annotate RequestA with @SerdeImport(HeaderABC.class)

0

There are 0 best solutions below