本文整理汇总了Scala中play.routes.compiler.InjectedRoutesGenerator类的典型用法代码示例。如果您正苦于以下问题:Scala InjectedRoutesGenerator类的具体用法?Scala InjectedRoutesGenerator怎么用?Scala InjectedRoutesGenerator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了InjectedRoutesGenerator类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Scala代码示例。
示例1: ApplicationBuild
//设置package包名称以及导入依赖的类
import play.routes.compiler.InjectedRoutesGenerator
import sbt._
import Keys._
import play.sbt.Play.autoImport._
import play.sbt.routes.RoutesKeys._
object ApplicationBuild extends Build {
def getEnv(env:String):Option[String] = Option(System.getenv(env))
val appName = "playframework-with-reactjs-boilerplate"
val appVersion = "1.0-SNAPSHOT-" + getEnv("BUILD_NUMBER").map{ _+getEnv("GIT_COMMIT").map("_"+_).getOrElse("")}.getOrElse("local")
val appDependencies = Seq(
jdbc,
cache,
ws,
specs2 % Test,
"com.amazonaws" % "aws-java-sdk" % "1.9.7",
"mysql" % "mysql-connector-java" % "5.1.24",
"org.scalikejdbc" %% "scalikejdbc" % "2.4.2",
"org.scalikejdbc" %% "scalikejdbc-config" % "2.4.2",
"org.scalikejdbc" %% "scalikejdbc-test" % "2.4.2" % "test",
"org.scalikejdbc" %% "scalikejdbc-play-initializer" % "2.4.1",
"org.json4s" %% "json4s-native" % "3.3.0",
"org.json4s" %% "json4s-ext" % "3.3.0",
"com.github.tototoshi" %% "play-json4s-native" % "0.5.0",
"com.github.tototoshi" %% "play-json4s-test-native" % "0.5.0" % "test",
"org.flywaydb" %% "flyway-play" % "3.0.1",
"com.nulab-inc" %% "play2-oauth2-provider" % "1.0.0",
"ch.qos.logback.contrib" % "logback-json-core" % "0.1.5",
"ch.qos.logback.contrib" % "logback-json-classic" % "0.1.5",
"ch.qos.logback.contrib" % "logback-jackson" % "0.1.5",
"com.fasterxml.jackson.core" % "jackson-core" % "2.8.3",
"com.fasterxml.jackson.core" % "jackson-databind" % "2.8.3",
"com.fasterxml.jackson.core" % "jackson-annotations" % "2.8.3",
"com.amazonaws" % "aws-java-sdk" % "1.11.46",
"io.github.cloudify" %% "spdf" % "1.4.0"
)
val main = Project(appName, file(".")).enablePlugins(play.sbt.PlayScala)
.settings(Gulp.gulpSettings:_*)
.settings(Beanstalk.ebSettings:_*)
.settings(scalikejdbc.mapper.SbtPlugin.scalikejdbcSettings)
.settings(
version := appVersion,
libraryDependencies ++= appDependencies,
scalaVersion := "2.11.7",
resolvers += "scalaz-bintray" at "http://dl.bintray.com/scalaz/releases",
routesGenerator := InjectedRoutesGenerator,
PlayKeys.devSettings := Seq("play.server.http.port" -> "9000")
)
}
示例2: Common
//设置package包名称以及导入依赖的类
import play.routes.compiler.InjectedRoutesGenerator
import sbt._
import sbt.Keys._
import play.sbt.routes._
object Common {
val organisationString = "spring"
val scalaVersionString = "2.11.8"
val springRepo = "https://nexus.prod.corp/content"
lazy val allResolvers = Seq(
"spring" at s"$springRepo/groups/public",
Resolver.sonatypeRepo("releases"),
Resolver.sonatypeRepo("snapshots"),
"Atlassian Releases" at "https://maven.atlassian.com/public/"
)
lazy val commonSettings = Seq(
organization := organisationString,
scalaVersion := scalaVersionString,
scalacOptions := Seq(
"-Xlint",
//"-Xlog-implicits",
"-deprecation",
"-feature",
"-encoding", "UTF-8",
"-unchecked",
"-Ywarn-dead-code",
//"-Ywarn-value-discard",
"-Ywarn-numeric-widen"
),
resolvers ++= allResolvers,
parallelExecution := false
)
lazy val playSettings = Seq(
RoutesKeys.routesGenerator := InjectedRoutesGenerator)
}