我正在使用 Windows 操作系统、JDK 1.7、Gradle 3.0、IDE Eclipse mars 和 jetty 8.1.5.v20120716。
注意:我也在使用 gretty 插件
gretty {
port = http_port
host = '127.0.0.1'
contextPath = ''
classPath = sourceSets.main.resources.srcDirs
servletContainer = 'jetty9' //tomcat7 or tomcat8
httpPort = 8081
servicePort = 8082
statusPort = 8083
}
我尝试过的所有选项的行为都是相同的,它只是挂在端口 5005 语句处,甚至没有加载应用程序。我正在使用基于 Spring 注释的类类型,我们初始化器“AbstractAnnotationConfigDispatcherServletInitializer”
我尝试了以下选项。appStartDebug、appRunDebug、jettyStartDebug 和 jettyRunDebug。
C:\project>echo %GRADLE_OPTS%
-Xdebug -Xrunjdwp:transport=dt_socket,address=9999,server=y,suspend=n
C:\project>gradle jettyStartDebug
Listening for transport dt_socket at address: 9999
Starting a Gradle Daemon, 10 busy and 19 stopped Daemons could not be reused, use --status for details
'5e5ca94'
:prepareInplaceWebAppFolder UP-TO-DATE
:createInplaceWebAppFolder UP-TO-DATE
:compileJava UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:prepareInplaceWebAppClasses UP-TO-DATE
:prepareInplaceWebApp UP-TO-DATE
:jettyStartDebug
Listening for transport dt_socket at address: 5005
请有人在这个问题上帮助我。