The reason is that only the type byType is-a relationship
Caused by: org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type 'com.bjpowernodeyushuxingPrimarySchool.School' available: expected single matching bean but found 2: school, mySchool2