Как проверить ClassPathXmlApplicationContext и getBean () в junit springboot
HType type = HType.getByType(args[0]);
IService service = null;
try (ClassPathXmlApplicationContext cont =
new ClassPathXmlApplicationContext("classpath:bean-cofig_abc.xml")){
service = (IHService)cont.getBean(type.getBeanName());
} catch (BeansException e) {
//TODO
}
service.execute();