rollback scalatra template

This commit is contained in:
wing328 2015-06-09 12:57:31 +08:00
parent b636d2a2c9
commit f2ee63da3b
9 changed files with 148 additions and 146 deletions

View File

@ -1,7 +1,17 @@
import org.eclipse.jetty.server._
import org.eclipse.jetty.webapp.WebAppContext
import org.scalatra.servlet.ScalatraListener
object JettyMain { object JettyMain {
object conf {
val port = sys.env.get("PORT") map (_.toInt) getOrElse (8080)
val stopTimeout = sys.env.get("STOP_TIMEOUT") map (_.toInt) getOrElse (5000)
val connectorIdleTimeout = sys.env.get("CONNECTOR_IDLE_TIMEOUT") map (_.toInt) getOrElse (90000)
val webapp = sys.env.get("PUBLIC") getOrElse "webapp"
val contextPath = sys.env.get("CONTEXT_PATH") getOrElse "/"
}
def main(args: Array[String]) = { def main(args: Array[String]) = {
val server: Server = new Server val server: Server = new Server
println("starting jetty") println("starting jetty")
@ -30,12 +40,4 @@ object JettyMain {
server.start() server.start()
} }
object conf {
val port = sys.env.get("PORT") map (_.toInt) getOrElse (8080)
val stopTimeout = sys.env.get("STOP_TIMEOUT") map (_.toInt) getOrElse (5000)
val connectorIdleTimeout = sys.env.get("CONNECTOR_IDLE_TIMEOUT") map (_.toInt) getOrElse (90000)
val webapp = sys.env.get("PUBLIC") getOrElse "webapp"
val contextPath = sys.env.get("CONTEXT_PATH") getOrElse "/"
}
} }

View File

@ -1,5 +1,7 @@
package json package json
import com.fasterxml.jackson.module.scala.DefaultScalaModule
import com.fasterxml.jackson.core.JsonGenerator.Feature
import com.fasterxml.jackson.databind._ import com.fasterxml.jackson.databind._
object JsonUtil { object JsonUtil {

View File

@ -1,6 +1,4 @@
import AssemblyKeys._ // put this at the top of the file
// put this at the top of the file
import NativePackagerKeys._ import NativePackagerKeys._

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0"> version="3.0">
<listener> <listener>