首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用spring-boot-starter-jetty时立即退出

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

Stack Overflow用户
提问于 2019-04-15 11:53:23
回答 1查看 98关注 0票数 0

我正在使用spring-boot-starter-jetty替换spring-boot-starter-tomcat.The。pom.xml如下:

代码语言:javascript
复制
<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>

但是当我使用mvn spring-boot:run运行时,我得到了:

代码语言:javascript
复制
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

可能的原因是什么?

EN

回答 1

Stack Overflow用户

发布于 2019-04-15 14:00:20

我已经通过删除application.yml中的spring.main.web-application-type解决了这个问题

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/55682394

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档