@Target(value={PARAMETER,ANNOTATION_TYPE,FIELD}) @Retention(value=RUNTIME) public @interface ComponentImport
public abstract String value
The default is to use the imported interface name with the first character lowercased,
e.g. this code will result in a bean name of contentService:
@Named
public class MyComponent {
@Inject
public MyComponent(@ComponentImport ContentService myExternalService) {
// more stuff here
}
}
So you only need to set this if you want to override the default: e.g. if you're importing
two services with the same classname from different packages, you need to set different names for them;
or if you need specific bean names to use with @Qualifier("yourBeanName").
This name is local to this plugin's spring context; it's unrelated to the name of the bean (inside the product's or the providing plugin's spring context) that's exporting the service we're importing.
Copyright © 2018 Atlassian. All rights reserved.