title: How to initialize Application Context in Spring Framework 4
body: <p>I have a project based on <em>Spring Framework 4</em> and its subproject - Spring Data Solr.</p>
  
  <p>All examples I had a chance to see explain how to organize your project - from base entity ( pojo's ) classes till spring specific classes such as repositories and service. When it came to test functionality all examples show a test with private field ( spring bean ) which usually becomes initialized with the help of annotation </p>
  
  <pre><code>@ContextConfiguration(classes = some-spring-data-main-class.class, loader = SpringApplicationContextLoader.class)
  </code></pre>
  
  <p>Then it is possible to call for it's bean's methods in <code>@Test</code> methods.</p>
  
  <p>But, when it comes to init bean in a project - how to make it with Spring 4, which is completely XMLless ( I mean, I do not have an <code>applicationContext xml</code> file ).</p>
  
  <p>P.S. in Spring 3 we usually wrote smth like: </p>
  
  <pre><code>ApplicationContext context = new ClasspathApplicationContext("applicationContext.xml") 
  </code></pre>
  
  <p>Is it reasonable to expect smth similar to this of Spring 4 introduces absolutely new concepts of application initialization? What should we write now to init app's first bean?</p>