一、gradle安装gretty插件
buildscript {
repositories {
jcenter()
}
dependencies {
classpath "gradle.plugin.org.akhikhl.gretty:gretty:2.0.0"
}
}
plugins {
id 'java'
id 'war'
id 'org.akhikhl.gretty' version "2.0.0"
}
二、自定义启动设置
gretty {
httpPort = 8081
// 'jetty7', 'jetty8', 'jetty9', 'jetty93', 'jetty94', 'tomcat7', 'tomcat8'
servletContainer = 'jetty9'
contextPath = '/'
}