Annotation Interface ComponentImport


@Documented @Retention(RUNTIME) @Target({PARAMETER,FIELD}) public @interface ComponentImport
Informs Spring-OSGi bridge which component should be imported from OSGi. Used by spring-plugin-activator to initialize spring context in plugins.

Usable only on autowired component in plugins spring contexts initiated by spring-plugin-activator library. Annotated autowired components will be automatically imported from OSGi based on interface type. As OSGi doesn't support exporting classes that are not interfaces, this annotation only work with interfaces.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    If true, will not import service until it is needed to autowire.
    Name of bean to autowire.
  • Element Details

    • value

      String value
      Name of bean to autowire. If empty will autowire using interface.
      Default:
      ""
    • lateBind

      boolean lateBind
      If true, will not import service until it is needed to autowire.
      Default:
      false