spring - Play Framework and Java8 -
i have 1 java 8 project , project dependency of play web app. whenever try instantiate classes rom java 8 project in play 2.2.3 web app, gives me following error:
play.playexceptions$compilationexception: compilation error[error: cannot access mongooperations] @ play.playreloader$$anon$1$$anonfun$reload$2$$anonfun$apply$14$$anonfun$apply$16.apply(playreloader.scala:304) ~[na:na] @ play.playreloader$$anon$1$$anonfun$reload$2$$anonfun$apply$14$$anonfun$apply$16.apply(playreloader.scala:304) ~[na:na]
how should let play compile code java 8 when 'play "run 8080"' ? why play isn't able access class in java 8 project ?
fyi: java_home pointing java 8.
here how build.sbt looks like. note 'content-aggregator' local artifact installed in local maven repo.
name := "web" version := "1.0-snapshot" resolvers += "maven central" @ "http://repo1.maven.org/maven2" librarydependencies ++= seq( javajdbc, javaebean, cache, "de.undercouch" % "bson4jackson" % "2.1.0" force(), "com.fasterxml.jackson.core" % "jackson-databind" % "2.1.0" force(), "com.fasterxml.jackson.core" % "jackson-annotations" % "2.1.0" force(), "com.fasterxml.jackson.core" % "jackson-core" % "2.1.0" force(), "org.mongodb" % "mongo-java-driver" % "2.11.3", "com.techr" % "content-aggregator" % "0.0.1-snapshot", "org.jongo" % "jongo" % "1.0", "uk.co.panaxiom" %% "play-jongo" % "0.6.0-jongo1.0" ) play.project.playjavasettings
in 'content-aggregator'(java 8) project using spring , have injected beans autowiring. mongooperations autowired in 1 of classes , play yelling it. springmongoconfig.java class project marked @configuration annotation. in play project have created config class imports content-aggregator's config class.
@configuration @import(springmongoconfig.class) public class springconfig { }
Comments
Post a Comment