欢迎大家赞助一杯啤酒🍺 我们准备了下酒菜:Formal mathematics/Isabelle/ML, Formal verification/Coq/ACL2, C++/F#/Lisp
Play app deployment guide
来自开放百科 - 灰狐
(版本间的差异)
(以“Play 应用部署指南 ==项目== *[play2-war-plugin] WAR Plugin for Play framework 2.x *[https://github.com/typesafehub/activator-play-tls-exam...”为内容创建页面) |
小 (→指南) |
||
(未显示1个用户的3个中间版本) | |||
第1行: | 第1行: | ||
[[play framework|Play]] 应用部署指南 | [[play framework|Play]] 应用部署指南 | ||
+ | |||
+ | ==指南== | ||
+ | 参考 [https://github.com/play2war/play2-war-plugin/wiki/Configuration Play2War plugin Configuration] | ||
+ | |||
+ | play new playwebapp | ||
+ | |||
+ | build.sbt | ||
+ | name := "playwebapp" | ||
+ | version := "1.0-SNAPSHOT" | ||
+ | libraryDependencies ++= Seq( | ||
+ | jdbc, | ||
+ | anorm, | ||
+ | cache | ||
+ | ) | ||
+ | project/plugins.sbt | ||
+ | logLevel := Level.Warn | ||
+ | resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/" | ||
+ | resolvers += Resolver.url( | ||
+ | "bintray-sbt-plugin-releases", | ||
+ | url("http://dl.bintray.com/content/sbt/sbt-plugin-releases"))( | ||
+ | Resolver.ivyStylePatterns) | ||
+ | addSbtPlugin("com.github.play2war" % "play2-war-plugin" % "1.2.1") | ||
+ | |||
+ | addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.4") | ||
+ | project/Build.scala | ||
+ | import sbt._ | ||
+ | import Keys._ | ||
+ | import play.Project._ | ||
+ | import com.github.play2war.plugin._ | ||
+ | |||
+ | object ApplicationBuild extends Build { | ||
+ | val appName = "playwebapp" | ||
+ | val appVersion = "1.0-SNAPSHOT" | ||
+ | |||
+ | val appDependencies = Seq( | ||
+ | // Add your project dependencies here, | ||
+ | javaCore, | ||
+ | javaJdbc, | ||
+ | javaEbean | ||
+ | ) | ||
+ | |||
+ | val main = play.Project(appName, appVersion, appDependencies) | ||
+ | .settings(Play2WarPlugin.play2WarSettings: _*) | ||
+ | |||
+ | .settings( | ||
+ | Play2WarKeys.servletVersion := "3.1" | ||
+ | ) | ||
+ | } | ||
+ | 打包 $ play war | ||
+ | |||
+ | target目录下:playwebapp-1.0-SNAPSHOT.war | ||
==项目== | ==项目== | ||
− | *[play2-war-plugin] WAR Plugin for Play framework 2.x | + | *[https://github.com/play2war/play2-war-plugin play2-war-plugin] WAR Plugin for Play framework 2.x |
*[https://github.com/typesafehub/activator-play-tls-example activator-play-tls-example] | *[https://github.com/typesafehub/activator-play-tls-example activator-play-tls-example] | ||
*[https://github.com/swagger-api/swagger-play Swagger Play Integration] | *[https://github.com/swagger-api/swagger-play Swagger Play Integration] | ||
==链接== | ==链接== | ||
+ | *[http://www.tuicool.com/articles/nyQRJn Play 2 Web Application Deployment Tutorial] | ||
[[category:play]] | [[category:play]] |
2016年5月27日 (五) 10:06的最后版本
Play 应用部署指南
[编辑] 指南
参考 Play2War plugin Configuration
play new playwebapp
build.sbt
name := "playwebapp" version := "1.0-SNAPSHOT" libraryDependencies ++= Seq( jdbc, anorm, cache )
project/plugins.sbt
logLevel := Level.Warn resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/" resolvers += Resolver.url( "bintray-sbt-plugin-releases", url("http://dl.bintray.com/content/sbt/sbt-plugin-releases"))( Resolver.ivyStylePatterns) addSbtPlugin("com.github.play2war" % "play2-war-plugin" % "1.2.1")
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.4")
project/Build.scala
import sbt._ import Keys._ import play.Project._ import com.github.play2war.plugin._
object ApplicationBuild extends Build { val appName = "playwebapp" val appVersion = "1.0-SNAPSHOT"
val appDependencies = Seq( // Add your project dependencies here, javaCore, javaJdbc, javaEbean )
val main = play.Project(appName, appVersion, appDependencies) .settings(Play2WarPlugin.play2WarSettings: _*)
.settings( Play2WarKeys.servletVersion := "3.1" ) }
打包 $ play war
target目录下:playwebapp-1.0-SNAPSHOT.war
[编辑] 项目
- play2-war-plugin WAR Plugin for Play framework 2.x
- activator-play-tls-example
- Swagger Play Integration
[编辑] 链接
分享您的观点