After loading beans using XmlBeanDefinitionReader's loadBeanDefinitions method , Auto scan feature of spring xml does not work as all the beans mentioned in the xml gets created but the beans which are marked by @Component to auto detect are not created.why Xsd validation is not working ?
code that i am writing is
 XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(beanDefinitionRegistry);
 reader.setValidationMode(XmlBeanDefinitionReader.VALIDATION_XSD);
 reader.loadBeanDefinitions(resource);
 ((ConfigurableApplicationContext) context).refresh(); 
Please help, thanks in advance.