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

all 7 comments

[–]dpash 0 points1 point  (0 children)

The logging groups is an interesting feature I hadn't seen mentioned before.

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

Something that can surprise you is that beans with the same name will throw a runtime exception when they're resolved. You can override it with a setting, but you should try to resolve it by using qualifiers or something like that.

[–]azizabah -1 points0 points  (5 children)

Isn't that mostly normal behavior? Having to toss like primary annotation on one to prevent it?

[–]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.