-
@Target(TYPE) @Retention(RUNTIME) public @interface Component
Identify a bean as component with singleton scope that avaje-inject will use.This is an alternative to using the standard
@Singletonannotation. We generally use@Componentwhen we:- Want to use avaje-inject in a project that has some other library using
@Singleton - Want to support BOTH
javax.injectandjakarta.inject
Example
{@code- See Also:
InjectModule.ignoreSingleton()
- Want to use avaje-inject in a project that has some other library using