您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

Spring Boot App启动后总是总是关闭?

Spring Boot App启动后总是总是关闭?

解决方法:该应用程序不是Web应用程序,因为它在类路径上没有嵌入式容器(例如Tomcat)。加一个固定的。如果您使用的是Maven,则将其添加pom.xml

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
</dependency>

对于Gradle(build.gradle),它看起来像

dependencies {
    compile 'org.springframework.boot:spring-boot-starter-web'
}
Java 2022/1/1 18:17:59 有529人围观

撰写回答


你尚未登录,登录后可以

和开发者交流问题的细节

关注并接收问题和回答的更新提醒

参与内容的编辑和改进,让解决方法与时俱进

请先登录

推荐问题


联系我
置顶