I need your help and help. The point, I think, in some trifles, which I do not see at all. I am picking Spring on the sly according to the lecture by Evgeny Borisov ( https://www.youtube.com/watch?v=BmBr5diz8WA ) and I encountered such a problem (repository with the project on the githaba https://github.com/redbeard3/SpringProject/tree/master / src / main ) - code execution crashes with the error:
апр 20, 2019 6:21:16 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions INFO: Loading XML bean definitions from class path resource [common_beans.xml] Exception in thread "main" java.lang.NullPointerException at redbeard.Runner.main(Runner.java:8) Process finished with exit code 1 And:
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("common_beans.xml"); it works fine, the bin from common_beans.xml with id = 'terminatorQuoter' is configured, that is, the required value is set in the repeat bin field of the terminatorQuoter: 
The error is in
context.getBean(TerminatorQuoter.class).sayQuote(); because:
context.getBean(TerminatorQuoter.class) выдает null However, if I remove everything related to the InjectRandomInt annotation, that is, I don’t use it at all, and in the sayQuote () method I simply output the message:
System.out.println(message); then everything works. Tell me where that missed. Although the lecture was revised several times, I carefully verified everything I did.
