简体   繁体   中英

Spring Boot embedded Jetty stop right away after start

Here's my main class

@SpringBootApplication
public class SendMsg {  
    public static void main(String...args) {
        SpringApplication.run(SendMsg.class, args);
    }
}

In my gradle.build I have:

compile("org.springframework.boot:spring-boot-starter-web:${springBootVersion}") {
    exclude module: "spring-boot-starter-logging"
}
compile("org.springframework.boot:spring-boot-starter-jetty:${springBootVersion}")

I'm using IntelliJ. When I run the class SendMsg from within the IDE, Spring Boot start, then stop right away. I'm not sure why that's the case.

log4j:WARN No appenders could be found for logger (org.springframework.web.context.support.StandardServletEnvironment).
log4j:WARN Please initialize the log4j system properly.

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v1.4.2.RELEASE)

   [main] | org.eclipse.jetty.util.component.AbstractLifeCycle | STARTED @3096ms org.eclipse.jetty.websocket.server.WebSocketServerFactory@66ec9390
    2016-11-15 09:21:49.739-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.websocket.jsr356.DecoderFactory | init(org.eclipse.jetty.websocket.jsr356.client.EmptyClientEndpointConfig@4afd21c6)
    2016-11-15 09:21:49.739-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.DecoratedObjectFactory | Creating Instance: class org.eclipse.jetty.websocket.jsr356.decoders.BooleanDecoder
    2016-11-15 09:21:49.739-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.DecoratedObjectFactory | Creating Instance: class org.eclipse.jetty.websocket.jsr356.decoders.ByteDecoder
    2016-11-15 09:21:49.740-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.DecoratedObjectFactory | Creating Instance: class org.eclipse.jetty.websocket.jsr356.decoders.CharacterDecoder
    2016-11-15 09:21:49.740-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.DecoratedObjectFactory | Creating Instance: class org.eclipse.jetty.websocket.jsr356.decoders.DoubleDecoder
    2016-11-15 09:21:49.740-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.DecoratedObjectFactory | Creating Instance: class org.eclipse.jetty.websocket.jsr356.decoders.FloatDecoder
    2016-11-15 09:21:49.740-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.DecoratedObjectFactory | Creating Instance: class org.eclipse.jetty.websocket.jsr356.decoders.IntegerDecoder
    2016-11-15 09:21:49.741-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.DecoratedObjectFactory | Creating Instance: class org.eclipse.jetty.websocket.jsr356.decoders.LongDecoder
    2016-11-15 09:21:49.741-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.DecoratedObjectFactory | Creating Instance: class org.eclipse.jetty.websocket.jsr356.decoders.ShortDecoder
    2016-11-15 09:21:49.741-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.DecoratedObjectFactory | Creating Instance: class org.eclipse.jetty.websocket.jsr356.decoders.StringDecoder
    2016-11-15 09:21:49.741-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.DecoratedObjectFactory | Creating Instance: class org.eclipse.jetty.websocket.jsr356.decoders.BooleanDecoder
    2016-11-15 09:21:49.741-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.DecoratedObjectFactory | Creating Instance: class org.eclipse.jetty.websocket.jsr356.decoders.ByteDecoder
    2016-11-15 09:21:49.741-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.DecoratedObjectFactory | Creating Instance: class org.eclipse.jetty.websocket.jsr356.decoders.CharacterDecoder
    2016-11-15 09:21:49.741-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.DecoratedObjectFactory | Creating Instance: class org.eclipse.jetty.websocket.jsr356.decoders.DoubleDecoder
    2016-11-15 09:21:49.741-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.DecoratedObjectFactory | Creating Instance: class org.eclipse.jetty.websocket.jsr356.decoders.FloatDecoder
    2016-11-15 09:21:49.741-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.DecoratedObjectFactory | Creating Instance: class org.eclipse.jetty.websocket.jsr356.decoders.IntegerDecoder
    2016-11-15 09:21:49.741-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.DecoratedObjectFactory | Creating Instance: class org.eclipse.jetty.websocket.jsr356.decoders.LongDecoder
    2016-11-15 09:21:49.741-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.DecoratedObjectFactory | Creating Instance: class org.eclipse.jetty.websocket.jsr356.decoders.ShortDecoder
    2016-11-15 09:21:49.741-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.DecoratedObjectFactory | Creating Instance: class org.eclipse.jetty.websocket.jsr356.decoders.ByteBufferDecoder
    2016-11-15 09:21:49.741-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.DecoratedObjectFactory | Creating Instance: class org.eclipse.jetty.websocket.jsr356.decoders.ByteArrayDecoder
    2016-11-15 09:21:49.741-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.DecoratedObjectFactory | Creating Instance: class org.eclipse.jetty.websocket.jsr356.decoders.PongMessageDecoder
    2016-11-15 09:21:49.741-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.DecoratedObjectFactory | Creating Instance: class org.eclipse.jetty.websocket.jsr356.decoders.ReaderDecoder
    2016-11-15 09:21:49.741-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.DecoratedObjectFactory | Creating Instance: class org.eclipse.jetty.websocket.jsr356.decoders.InputStreamDecoder
    2016-11-15 09:21:49.742-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.websocket.jsr356.EncoderFactory | init(org.eclipse.jetty.websocket.jsr356.client.EmptyClientEndpointConfig@4afd21c6)
    2016-11-15 09:21:49.742-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.DecoratedObjectFactory | Creating Instance: class org.eclipse.jetty.websocket.jsr356.encoders.BooleanEncoder
    2016-11-15 09:21:49.742-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.DecoratedObjectFactory | Creating Instance: class org.eclipse.jetty.websocket.jsr356.encoders.ByteEncoder
    2016-11-15 09:21:49.743-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.DecoratedObjectFactory | Creating Instance: class org.eclipse.jetty.websocket.jsr356.encoders.CharacterEncoder
    2016-11-15 09:21:49.743-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.DecoratedObjectFactory | Creating Instance: class org.eclipse.jetty.websocket.jsr356.encoders.DoubleEncoder
    2016-11-15 09:21:49.743-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.DecoratedObjectFactory | Creating Instance: class org.eclipse.jetty.websocket.jsr356.encoders.FloatEncoder
    2016-11-15 09:21:49.743-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.DecoratedObjectFactory | Creating Instance: class org.eclipse.jetty.websocket.jsr356.encoders.IntegerEncoder
    2016-11-15 09:21:49.743-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.DecoratedObjectFactory | Creating Instance: class org.eclipse.jetty.websocket.jsr356.encoders.LongEncoder
    2016-11-15 09:21:49.743-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.DecoratedObjectFactory | Creating Instance: class org.eclipse.jetty.websocket.jsr356.encoders.ShortEncoder
    2016-11-15 09:21:49.743-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.DecoratedObjectFactory | Creating Instance: class org.eclipse.jetty.websocket.jsr356.encoders.StringEncoder
    2016-11-15 09:21:49.743-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.DecoratedObjectFactory | Creating Instance: class org.eclipse.jetty.websocket.jsr356.encoders.BooleanEncoder
    2016-11-15 09:21:49.743-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.DecoratedObjectFactory | Creating Instance: class org.eclipse.jetty.websocket.jsr356.encoders.ByteEncoder
    2016-11-15 09:21:49.743-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.DecoratedObjectFactory | Creating Instance: class org.eclipse.jetty.websocket.jsr356.encoders.CharacterEncoder
    2016-11-15 09:21:49.743-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.DecoratedObjectFactory | Creating Instance: class org.eclipse.jetty.websocket.jsr356.encoders.DoubleEncoder
    2016-11-15 09:21:49.743-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.DecoratedObjectFactory | Creating Instance: class org.eclipse.jetty.websocket.jsr356.encoders.FloatEncoder
    2016-11-15 09:21:49.743-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.DecoratedObjectFactory | Creating Instance: class org.eclipse.jetty.websocket.jsr356.encoders.IntegerEncoder
    2016-11-15 09:21:49.743-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.DecoratedObjectFactory | Creating Instance: class org.eclipse.jetty.websocket.jsr356.encoders.LongEncoder
    2016-11-15 09:21:49.744-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.DecoratedObjectFactory | Creating Instance: class org.eclipse.jetty.websocket.jsr356.encoders.ShortEncoder
    2016-11-15 09:21:49.744-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.DecoratedObjectFactory | Creating Instance: class org.eclipse.jetty.websocket.jsr356.encoders.ByteBufferEncoder
    2016-11-15 09:21:49.744-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.DecoratedObjectFactory | Creating Instance: class org.eclipse.jetty.websocket.jsr356.encoders.ByteArrayEncoder
    2016-11-15 09:21:49.744-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.component.AbstractLifeCycle | STARTED @3102ms org.eclipse.jetty.websocket.jsr356.server.ServerContainer@6d4c273c
    2016-11-15 09:21:49.744-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.component.AbstractLifeCycle | starting org.springframework.boot.context.embedded.jetty.JettyEmbeddedErrorHandler@46678e49
    2016-11-15 09:21:49.744-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.server.handler.AbstractHandler | starting org.springframework.boot.context.embedded.jetty.JettyEmbeddedErrorHandler@46678e49
    2016-11-15 09:21:49.744-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.component.AbstractLifeCycle | STARTED @3103ms org.springframework.boot.context.embedded.jetty.JettyEmbeddedErrorHandler@46678e49
    2016-11-15 09:21:49.744-0600 | sessionId= | correlationId= | INFO    | [main] | org.eclipse.jetty.server.handler.ContextHandler | Started o.s.b.c.e.j.JettyEmbeddedWebAppContext@61a91912{/,file:///private/var/folders/vf/sc6988r90rdc0jbbjkhzv571dv5hs5/T/jetty-docbase.1071746313451738117.8080/,AVAILABLE}
    2016-11-15 09:21:49.744-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.webapp.WebAppContext | postConfigure o.s.b.c.e.j.JettyEmbeddedWebAppContext@61a91912{/,file:///private/var/folders/vf/sc6988r90rdc0jbbjkhzv571dv5hs5/T/jetty-docbase.1071746313451738117.8080/,AVAILABLE} with org.springframework.boot.context.embedded.jetty.ServletContextInitializerConfiguration@78e89bfe
    2016-11-15 09:21:49.745-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.webapp.WebAppContext | postConfigure o.s.b.c.e.j.JettyEmbeddedWebAppContext@61a91912{/,file:///private/var/folders/vf/sc6988r90rdc0jbbjkhzv571dv5hs5/T/jetty-docbase.1071746313451738117.8080/,AVAILABLE} with org.springframework.boot.autoconfigure.websocket.JettyWebSocketContainerCustomizer$1@652ce654
    2016-11-15 09:21:49.745-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.webapp.WebAppContext | postConfigure o.s.b.c.e.j.JettyEmbeddedWebAppContext@61a91912{/,file:///private/var/folders/vf/sc6988r90rdc0jbbjkhzv571dv5hs5/T/jetty-docbase.1071746313451738117.8080/,AVAILABLE} with org.springframework.boot.context.embedded.jetty.JettyEmbeddedServletContainerFactory$1@522ba524
    2016-11-15 09:21:49.745-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.webapp.WebAppContext | postConfigure o.s.b.c.e.j.JettyEmbeddedWebAppContext@61a91912{/,file:///private/var/folders/vf/sc6988r90rdc0jbbjkhzv571dv5hs5/T/jetty-docbase.1071746313451738117.8080/,AVAILABLE} with org.springframework.boot.context.embedded.jetty.JettyEmbeddedServletContainerFactory$2@29c5ee1d
    2016-11-15 09:21:49.745-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.component.AbstractLifeCycle | STARTED @3103ms o.s.b.c.e.j.JettyEmbeddedWebAppContext@61a91912{/,file:///private/var/folders/vf/sc6988r90rdc0jbbjkhzv571dv5hs5/T/jetty-docbase.1071746313451738117.8080/,AVAILABLE}
    2016-11-15 09:21:49.745-0600 | sessionId= | correlationId= | INFO    | [main] | org.eclipse.jetty.server.Server | Started @3103ms
    2016-11-15 09:21:49.745-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.component.AbstractLifeCycle | STARTED @3103ms org.eclipse.jetty.server.Server@1a5f7e7c
    2016-11-15 09:21:49.765-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.component.AbstractLifeCycle | stopping org.eclipse.jetty.server.Server@1a5f7e7c
    2016-11-15 09:21:49.766-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.server.Server | doStop org.eclipse.jetty.server.Server@1a5f7e7c
    2016-11-15 09:21:49.767-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.server.Server | Graceful shutdown org.eclipse.jetty.server.Server@1a5f7e7c by 
    2016-11-15 09:21:49.767-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.server.handler.AbstractHandler | stopping org.eclipse.jetty.server.Server@1a5f7e7c
    2016-11-15 09:21:49.767-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.component.AbstractLifeCycle | stopping org.eclipse.jetty.server.session.HashSessionIdManager@24e08d59
    2016-11-15 09:21:49.767-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.component.AbstractLifeCycle | STOPPED org.eclipse.jetty.server.session.HashSessionIdManager@24e08d59
    2016-11-15 09:21:49.767-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.component.AbstractLifeCycle | stopping o.s.b.c.e.j.JettyEmbeddedWebAppContext@61a91912{/,file:///private/var/folders/vf/sc6988r90rdc0jbbjkhzv571dv5hs5/T/jetty-docbase.1071746313451738117.8080/,SHUTDOWN}
    2016-11-15 09:21:49.767-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.server.handler.AbstractHandler | stopping o.s.b.c.e.j.JettyEmbeddedWebAppContext@61a91912{/,file:///private/var/folders/vf/sc6988r90rdc0jbbjkhzv571dv5hs5/T/jetty-docbase.1071746313451738117.8080/,UNAVAILABLE}
    2016-11-15 09:21:49.768-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.component.AbstractLifeCycle | stopping org.springframework.boot.context.embedded.jetty.JettyEmbeddedErrorHandler@46678e49
    2016-11-15 09:21:49.768-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.server.handler.AbstractHandler | stopping org.springframework.boot.context.embedded.jetty.JettyEmbeddedErrorHandler@46678e49
    2016-11-15 09:21:49.768-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.component.AbstractLifeCycle | STOPPED org.springframework.boot.context.embedded.jetty.JettyEmbeddedErrorHandler@46678e49
    2016-11-15 09:21:49.768-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.component.AbstractLifeCycle | stopping org.eclipse.jetty.websocket.jsr356.server.ServerContainer@6d4c273c
    2016-11-15 09:21:49.768-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.component.AbstractLifeCycle | stopping org.eclipse.jetty.websocket.server.WebSocketServerFactory@66ec9390
    2016-11-15 09:21:49.768-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.component.AbstractLifeCycle | stopping org.eclipse.jetty.util.thread.ScheduledExecutorScheduler@5bb7643d
    2016-11-15 09:21:49.768-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.component.AbstractLifeCycle | STOPPED org.eclipse.jetty.util.thread.ScheduledExecutorScheduler@5bb7643d
    2016-11-15 09:21:49.768-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.component.AbstractLifeCycle | STOPPED org.eclipse.jetty.websocket.server.WebSocketServerFactory@66ec9390
    2016-11-15 09:21:49.768-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.component.AbstractLifeCycle | stopping org.eclipse.jetty.websocket.client.WebSocketClient@2e3cdec2
    2016-11-15 09:21:49.768-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.websocket.client.WebSocketClient | Stopping org.eclipse.jetty.websocket.client.WebSocketClient@2e3cdec2
    2016-11-15 09:21:49.768-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.component.AbstractLifeCycle | stopping org.eclipse.jetty.util.thread.ScheduledExecutorScheduler@7a22a3c2
    2016-11-15 09:21:49.768-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.component.AbstractLifeCycle | STOPPED org.eclipse.jetty.util.thread.ScheduledExecutorScheduler@7a22a3c2
    2016-11-15 09:21:49.768-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.component.AbstractLifeCycle | stopping SslContextFactory@2e34384c(null,null)
    2016-11-15 09:21:49.768-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.component.AbstractLifeCycle | STOPPED SslContextFactory@2e34384c(null,null)
    2016-11-15 09:21:49.768-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.websocket.client.WebSocketClient | Stopped org.eclipse.jetty.websocket.client.WebSocketClient@2e3cdec2
    2016-11-15 09:21:49.768-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.component.AbstractLifeCycle | STOPPED org.eclipse.jetty.websocket.client.WebSocketClient@2e3cdec2
    2016-11-15 09:21:49.768-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.component.AbstractLifeCycle | STOPPED org.eclipse.jetty.websocket.jsr356.server.ServerContainer@6d4c273c
    2016-11-15 09:21:49.769-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.component.AbstractLifeCycle | stopping org.springframework.boot.context.embedded.jetty.ServletContextInitializerConfiguration$Initializer@19ccca5
    2016-11-15 09:21:49.769-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.component.AbstractLifeCycle | STOPPED org.springframework.boot.context.embedded.jetty.ServletContextInitializerConfiguration$Initializer@19ccca5
    2016-11-15 09:21:49.769-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.component.AbstractLifeCycle | stopping org.eclipse.jetty.server.session.SessionHandler@7906578e
    2016-11-15 09:21:49.769-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.server.handler.AbstractHandler | stopping org.eclipse.jetty.server.session.SessionHandler@7906578e
    2016-11-15 09:21:49.769-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.component.AbstractLifeCycle | stopping org.eclipse.jetty.security.ConstraintSecurityHandler@322803db
    2016-11-15 09:21:49.769-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.server.handler.AbstractHandler | stopping org.eclipse.jetty.security.ConstraintSecurityHandler@322803db
    2016-11-15 09:21:49.769-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.component.AbstractLifeCycle | stopping org.springframework.boot.context.embedded.jetty.JettyEmbeddedWebAppContext$JettyEmbeddedServletHandler@878537d
    2016-11-15 09:21:49.769-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.server.handler.AbstractHandler | stopping org.springframework.boot.context.embedded.jetty.JettyEmbeddedWebAppContext$JettyEmbeddedServletHandler@878537d
    2016-11-15 09:21:49.770-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.component.AbstractLifeCycle | STOPPED org.springframework.boot.context.embedded.jetty.JettyEmbeddedWebAppContext$JettyEmbeddedServletHandler@878537d
    2016-11-15 09:21:49.770-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.component.AbstractLifeCycle | STOPPED org.eclipse.jetty.security.ConstraintSecurityHandler@322803db
    2016-11-15 09:21:49.770-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.component.AbstractLifeCycle | stopping org.eclipse.jetty.server.session.HashSessionManager@8a62297
    2016-11-15 09:21:49.770-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.component.AbstractLifeCycle | stopping org.eclipse.jetty.util.thread.ScheduledExecutorScheduler@50f40653
    2016-11-15 09:21:49.770-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.component.AbstractLifeCycle | STOPPED org.eclipse.jetty.util.thread.ScheduledExecutorScheduler@50f40653
    2016-11-15 09:21:49.771-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.component.AbstractLifeCycle | STOPPED org.eclipse.jetty.server.session.HashSessionManager@8a62297
    2016-11-15 09:21:49.771-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.component.AbstractLifeCycle | STOPPED org.eclipse.jetty.server.session.SessionHandler@7906578e
    2016-11-15 09:21:49.771-0600 | sessionId= | correlationId= | INFO    | [main] | org.eclipse.jetty.server.handler.ContextHandler | Stopped o.s.b.c.e.j.JettyEmbeddedWebAppContext@61a91912{/,file:///private/var/folders/vf/sc6988r90rdc0jbbjkhzv571dv5hs5/T/jetty-docbase.1071746313451738117.8080/,UNAVAILABLE}
    2016-11-15 09:21:49.771-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.component.AbstractLifeCycle | STOPPED o.s.b.c.e.j.JettyEmbeddedWebAppContext@61a91912{/,file:///private/var/folders/vf/sc6988r90rdc0jbbjkhzv571dv5hs5/T/jetty-docbase.1071746313451738117.8080/,UNAVAILABLE}
    2016-11-15 09:21:49.771-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.component.AbstractLifeCycle | stopping qtp1145391264{STARTED,8<=8<=200,i=8,q=0}
    2016-11-15 09:21:49.772-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.component.AbstractLifeCycle | STOPPED qtp1145391264{STOPPED,8<=8<=200,i=0,q=0}
    2016-11-15 09:21:49.772-0600 | sessionId= | correlationId= | DEBUG   | [main] | org.eclipse.jetty.util.component.AbstractLifeCycle | STOPPED org.eclipse.jetty.server.Server@1a5f7e7c

    Process finished with exit code 1

Here's the complete build.gradle

group 'com.tung.poc'
version '1.0-SNAPSHOT'

apply plugin: 'java'

sourceCompatibility = 1.7

repositories {

    mavenLocal()

    maven {
        url 'http://repo1.maven.org/maven2'
    }
    maven {
        url 'http://repo.spring.io/plugins-release'
    }
}

ext {
    springVersion = "4.3.4.RELEASE";
    jsonPath = "0.9.1";
    springBootVersion = "1.4.2.RELEASE";
}

dependencies {
    compile("org.springframework.boot:spring-boot-starter-web:${springBootVersion}") {
        exclude module: "spring-boot-starter-logging"
    }
    compile("org.springframework.boot:spring-boot-starter-jetty:${springBootVersion}")
    compile "org.springframework:spring-core:${springVersion}"
    compile "org.springframework:spring-jms:${springVersion}"

    compile "com.netflix.hystrix:hystrix-metrics-event-stream:1.4.10"

    testCompile(
            "junit:junit:4.12",
            "org.mockito:mockito-core:1.10.8",
            "org.easytesting:fest-assert-core:2.0M10",
            "org.hamcrest:hamcrest-all:1.3",
            "org.springframework:spring-test:${springVersion}",
            "com.jayway.jsonpath:json-path-assert:${jsonPath}",
            'nl.jqno.equalsverifier:equalsverifier:1.7.4'
    )
}

Try with this Gradle configuration

Sources from spring-boot docs https://spring.io/guides/gs/spring-boot/

dependencies {
    // tag::jetty[]
    compile("org.springframework.boot:spring-boot-starter-web") {
        exclude module: "spring-boot-starter-tomcat"
    }
    compile("org.springframework.boot:spring-boot-starter-jetty")
    // end::jetty[]
    // tag::actuator[]
    compile("org.springframework.boot:spring-boot-starter-actuator")
    // end::actuator[]
   testCompile("junit:junit:4.12",
        "org.mockito:mockito-core:1.10.8",
        "org.easytesting:fest-assert-core:2.0M10",
        "org.hamcrest:hamcrest-all:1.3",
        "org.springframework:spring-test:${springVersion}",
        "com.jayway.jsonpath:json-path-assert:${jsonPath}",
        'nl.jqno.equalsverifier:equalsverifier:1.7.4')
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM