Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sisu-users] binding priority

I have two components that implement the same component interface

    @Named
    @Singleton
    public class C1 implements Foo {}

    @Named // not a @Singleton, not sure if this is important
    public class C2 implements Foo {}


My application has single classloader, the two components are coming
from different jars, and C1 is before C2 on classpath.

Can I assume that "@Inject Foo" will reliably pick C1 based on classpath
order, or is there more to it?

Thank you in advance.

-- 
Regards,
Igor


Back to the top