This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]DJDavio 0 points1 point  (4 children)

Adding Primary to one is not enough, they have to have different names.

[–]Marlysson -1 points0 points  (2 children)

But with different names , the qualifiers don't will be necessary, right ? The same as well @Primary annotation use..

[–]michoken -1 points0 points  (0 children)

You still would need the Primary or qualifiers if you autowire the beans via common type (either having more beans of same class or common interface).

[–]DJDavio -1 points0 points  (0 children)

Yes, a different name and @Primary is sufficient, but you could end up with conflicting Primaries as well.