I am trying to add a CORS filter to my REST API for the Play Framework. I added the Filters class according to the documentation , however it doesn't seem to be able to find the following package, I searched high and low and no luck:
import play.filters.cors.CORSFilter;
And the Filter class:
import play.api.mvc.EssentialFilter;
import play.filters.cors.CORSFilter;
import play.http.HttpFilters;
import javax.inject.Inject;
public class Filters implements HttpFilters {
@Inject
CORSFilter corsFilter;
public EssentialFilter[] filters() {
return new EssentialFilter[] { corsFilter };
}
}
build.sbt:
libraryDependencies ++= Seq(
javaJpa,
filters,
"org.hibernate" % "hibernate-entitymanager" % "4.3.7.Final",
"org.projectlombok" % "lombok-maven" % "1.16.6.1",
"org.postgresql" % "postgresql" % "9.4.1207.jre7",
"org.springframework.data" % "spring-data-jpa" % "1.9.2.RELEASE",
"org.mindrot" % "jbcrypt" % "0.3m"
)
Where is this package?
source
share