I am using play-framework 2.4 with Spring-Data-Mongodb. But when i compile the project the compile throw an error:
[error] /home/james/play-spring-data-mongodb/app/configuration/SpringDataMongoConfiguration.java:10: package org.springframework.data.mongodb.config does not exist
[error] org.springframework.data.mongodb.config.AbstractMongoConfiguration
[error] /home/james/play-spring-data-mongodb/app/configuration/SpringDataMongoConfiguration.java:11: package org.springframework.data.mongodb.repository.config does not exist
[error] org.springframework.data.mongodb.repository.config.EnableMongoRepositories
[error] /home/james/play-spring-data-mongodb/app/configuration/SpringDataMongoConfiguration.java:25: cannot find symbol
[error] symbol: class AbstractMongoConfiguration
[error] AbstractMongoConfiguration
[error] /home/james/play-spring-data-mongodb/app/configuration/SpringDataMongoConfiguration.java:24: cannot find symbol
[error] symbol: class EnableMongoRepositories
[error] EnableMongoRepositories
The main thing is that, yesterday this works perfectly. But today i got this error, when trying to compile the project. My build.sbt
file as below:
name := """play-mongo-template"""
version := "1.0-SNAPSHOT"
lazy val root = (project in file(".")).enablePlugins(PlayJava)
scalaVersion := "2.11.6"
libraryDependencies ++= Seq(
javaJdbc,
cache,
javaWs,
"org.springframework" % "spring-context" % "4.1.6.RELEASE",
"org.springframework.data" % "spring-data-mongodb-parent" % "1.7.2.RELEASE"
)
// Play provides two styles of routers, one expects its actions to be injected, the
// other, legacy style, accesses its actions statically.
routesGenerator := InjectedRoutesGenerator
Update
I found the problem, THe problem is that, our play-framework
activator unable to download spring-framework dependency. When i open the .ivy folder and there is no jars are available. My system is connected with Internet, but still play sbt not resolve dependencies. How could i resolve this problem?