简体   繁体   English

使用spring-boot-starter-jetty时立即退出

[英]Exit immediately when using spring-boot-starter-jetty

I'm using spring-boot-starter-jetty to replace spring-boot-starter-tomcat.The pom.xml like this: 我正在使用spring-boot-starter-jetty来替换spring-boot-starter-tomcat。像这样的pom.xml:

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
    <exclusions>
        <exclusion>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
        </exclusion>
    </exclusions>
</dependency>
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-jetty</artifactId>
</dependency>

But when i run with mvn spring-boot:run ,i got: 但是当我使用mvn spring-boot:run ,我得到了:

2019-04-15 11:39:54,583 INFO (MBeanExporter.java:433)- Registering beans for JMX exposure on startup
2019-04-15 11:39:54,585 INFO (MBeanExporter.java:895)- Bean with name 'dataSource' has been autodetected for JMX exposure
2019-04-15 11:39:54,592 INFO (MBeanExporter.java:668)- Located MBean 'dataSource': registering with JMX server as MBean [com.alibaba.druid.spring.boot.autoconfigure:name=dataSource,type=DruidDataSourceWrapper]
2019-04-15 11:39:54,601 INFO (DefaultLifecycleProcessor.java:351)- Starting beans in phase 2147483647
2019-04-15 11:39:54,615 INFO (StartupInfoLogger.java:59)- Started Application in 10.888 seconds (JVM running for 16.338)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.971 s
[INFO] Finished at: 2019-04-15T11:39:54+08:00
[INFO] Final Memory: 72M/383M
[INFO] ------------------------------------------------------------------------
[WARNING] The requested profile "offical" could not be activated because it does not exist.
2019-04-15 11:39:55,073 INFO (AbstractApplicationContext.java:993)- Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@16af2879: startup date [Mon Apr 15 11:39:44 CST 2019]; root of context hierarchy
2019-04-15 11:39:55,073 INFO (DefaultLifecycleProcessor.java:366)- Stopping beans in phase 2147483647
2019-04-15 11:39:55,073 INFO (MBeanExporter.java:451)- Unregistering JMX-exposed beans on shutdown
2019-04-15 11:39:55,081 INFO (MBeanRegistrationSupport.java:183)- Unregistering JMX-exposed beans
2019-04-15 11:39:55,086 INFO (DruidDataSource.java:1885)- {dataSource-1} closing ...
2019-04-15 11:39:55,095 INFO (DruidDataSource.java:1955)- {dataSource-1} closed

What is the possible reason? 可能的原因是什么?

我已经删除解决它spring.main.web-application-typeapplication.yml

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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