In our company, we notified that on different servers the order of beans in the auto-collection collection is different, but on the same machine it is always the same (after each deployment). How does spring or perhaps classLoader order beans that are equivalent? in our case, we have 2 implementations of some interface. And these implementations are introduced into the collection in some place. And on host 1 it is always A, B in the injected set, and on host 2 it is always B, A.
Thus, it looks deterministic, but different on different machines. Can anyone confirm this? What does it depend on? I can not find information about this.
EDIT: I listed the files on HD without any definition using ls -U and noticed that on host 1 the classes are in order A, B and on host 2 in order B, A. Can anyone confirm that this cause? So, I will look for why this order is different on different machines :) (.war with the same, loaded directly from the nexus repository)
source
share