• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Scala InjectedRoutesGenerator类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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")
    )
} 
开发者ID:KentaKomai,项目名称:playframework-with-reactjs-boilerplate,代码行数:55,代码来源:Build.scala


示例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)
} 
开发者ID:KadekM,项目名称:play-slick-silhouette-auth-api,代码行数:40,代码来源:Common.scala



注:本文中的play.routes.compiler.InjectedRoutesGenerator类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Scala PreparedStatement类代码示例发布时间:2022-05-23
下一篇:
Scala InputSource类代码示例发布时间:2022-05-23
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap