title: Spring Scala with Play2: object springframework is not a member of package org
body: <p>I'm new in scala and I'm trying to use Spring Scala as di framework in simple helloWorld scala-play application. According to this article I placed Global object into root of application.
  <a href="https://www.playframework.com/documentation/2.1.x/ScalaDependencyInjection" rel="nofollow">https://www.playframework.com/documentation/2.1.x/ScalaDependencyInjection</a></p>
  
  <p>Here is my Global object:</p>
  
  <pre><code>import org.springframework.context.annotation.AnnotationConfigApplicationContext
  
  object Global extends play.api.GlobalSettings {
  
    private val context = new AnnotationConfigApplicationContext()
  
    override def getControllerInstance[A](controllerClass: Class[A]): A = {
      context.getBean(controllerClass)
    }
  }
  </code></pre>
  
  <p>And sbt file:</p>
  
  <pre><code>name := """test"""
  
  version := "1.0-SNAPSHOT"
  
  lazy val root = (project in file(".")).enablePlugins(PlayScala)
  
  scalaVersion := "2.11.1"
  
  resolvers += "SpringSource Milestone Repository" at "http://repo.springsource.org/milestone"
  
  libraryDependencies ++= Seq(
    jdbc,
    anorm,
    cache,
    ws,
    "org.springframework.scala" % "spring-scala" % "1.0.0.M1"
  )
  </code></pre>
  
  <p>And with all this stuff I get an Exception:</p>
  
  <pre><code>play.PlayExceptions$CompilationException: Compilation error[object springframework is not a member of package org]
      at play.PlayExceptions$CompilationException$.apply(PlayExceptions.scala:27) ~[na:na]
      at play.PlayExceptions$CompilationException$.apply(PlayExceptions.scala:27) ~[na:na]
      at scala.Option.map(Option.scala:145) ~[scala-library-2.11.1.jar:na]
  </code></pre>
  
  <p>As I understand after googling it could be because of default package and relative imports, but it didn't help me very much because suggested solutions, like <code>_root_</code> before spring package, didn't work. Could you please tell me what am I doing wrong?</p>