Я пытаюсь получить бин, используя ClassPathXmlApplicationContext
. Но я получаю: NoSuchBeanDefinitionException: No bean named 'newsController' is defined
ApplicationContext applicationContext = new
ClassPathXmlApplicationContext("classpath*:conf/Spring_Config.xml");
NewsController newsController = (NewsController)
applicationContext.getBean("newsController");
В xml :
<bean id="newsController" class="NewsController"/>