it's ok to define 2 same beans in xml and configuration
问题 I created an xml context config, and also an annotation-based context configuration class,each creates a bean with same id, same class. so I thought that this would create a conflict because spring would say "can't find a unique instance of type ttt.TTT" (I have seen this error elsewhere). but surprisingly, the following code actually runs fine, and the bean chosen is the one from xml. if I cross out either of the bean definitions, it works fine too. so, why am I not getting a bean definition