Wicia
Wicia

Reputation: 565

Spring - multiple @Components

Lets assume that I have beans A and B basing on the same class X. Is it possible to apply @Component annotation to class X and make Spring still recognize them separately?

Upvotes: 0

Views: 573

Answers (1)

john16384
john16384

Reputation: 8044

No, this is not possible as the Spring annotation @Component is not an inheritable annotation.

Upvotes: 2

Related Questions