title: ApplicationContext import in spring
body: <p>I'm learning Spring from this tutorial:</p>
  
  <p><a href="http://courses.caveofprogramming.com/courses/the-java-spring-tutorial/lectures/38024" rel="nofollow noreferrer">http://courses.caveofprogramming.com/courses/the-java-spring-tutorial/lectures/38024</a></p>
  
  <p>In this tutorial, instructor downloads spring dependencies (spring-beans, spring context, spring-core) in version 3.2.3.RELEASE. </p>
  
  <p>and then writes this code:</p>
  
  <pre><code>package com.caveofprogramming.spring.test;
  
  import org.springframework.context.ApplicationContext;
  import org.springframework.context.support.FileSystemXmlApplicationContext;
  
  public class App {
  
     public static void main(String[] args) {
  
        ApplicationContext context = new FileSystemXmlApplicationContext("beans.xml");
  
        Person person = (Person)context.getBean("person");
        person.speak();
  }
  }
  </code></pre>
  
  <p>When I use: spring-context, spring-beans and spring-core in last version 4.3.3.RELEASE then ApplicationContext import doesn't work.  It works when I change it to the old version. "Doesn't work" means that eclips doesn't know what I should import when I write "ApplicationContext context = new FileSystemXmlApplicationContext("beans.xml");" and when I write "import org.springframework.context.ApplicationContext" by myself it's underline.</p>
  
  <p>What should I do to import ApplicationContext with newest version dependencies?</p>
  
  <p>Edit:
  This is the error:</p>
  
  <pre><code>Exception in thread "main" java.lang.Error: Unresolved compilation problems: 
  ApplicationContext cannot be resolved to a type
  FileSystemXmlApplicationContext cannot be resolved to a type
  
  at com.caveofprogramming.spring.test.App.main(App.java:10)
  </code></pre>
  
  <p>and this is my pom file:</p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;groupId&gt;com.caveofprogramming.spring.test&lt;/groupId&gt;
  &lt;artifactId&gt;spring-tutorial-5&lt;/artifactId&gt;
  &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  &lt;dependencies&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.springframework&lt;/groupId&gt;
      &lt;artifactId&gt;spring-beans&lt;/artifactId&gt;
      &lt;version&gt;4.3.3.RELEASE&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.springframework&lt;/groupId&gt;
      &lt;artifactId&gt;spring-context&lt;/artifactId&gt;
      &lt;version&gt;4.3.3.RELEASE&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.springframework&lt;/groupId&gt;
      &lt;artifactId&gt;spring-core&lt;/artifactId&gt;
      &lt;version&gt;4.3.3.RELEASE&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Edit 2: I also saw that program accepts 4.1.1.RELEASE version. Mabye the newest version of dependencies isn't necessary?  I'm just starting with Spring and everyone says that I should work on the newest version.</p>
  
  <p>Edit 3; </p>
  
  <p>The only solution which I found is using spring-context 4.1.1.RELEASE</p>