Play app deployment guide

来自开放百科 - 灰狐
(版本间的差异)
跳转到: 导航, 搜索
(项目)
(指南)
 
第2行: 第2行:
  
 
==指南==
 
==指南==
 +
参考 [https://github.com/play2war/play2-war-plugin/wiki/Configuration Play2War plugin Configuration]
 +
 
play new playwebapp
 
play new playwebapp
  
第48行: 第50行:
 
打包 $ play war
 
打包 $ play war
  
target目录下:playwebapp-1.0-SNAPSHOT.war  
+
target目录下:playwebapp-1.0-SNAPSHOT.war
  
 
==项目==
 
==项目==

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

[编辑] 项目

[编辑] 链接

分享您的观点
个人工具
名字空间

变换
操作
导航
工具箱