Springboot启动后自动退出解决办法

问题复现

        启动SpringBoot项目成功启动后,总是自动退出。控制台应该会有一句提示消息:

No active profile set, falling back to default profiles: default

原因分析

        该问题一般都是因为Springboot项目在启动时没有正常启动Tomcat容器,只是执行了main方法而后进程关闭了。

解决办法

在pom.xml文件添加如下代码:

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

注意:添加依赖时注意版本号是否需要指定(<version>XXX</version>)。

相关推荐

  1. Springboot启动自动退出解决办法

    2024-01-16 11:56:02       61 阅读
  2. filebeat 端运行,自动退出解决

    2024-01-16 11:56:02       57 阅读
  3. IDEA异常退出重启项目启动失败解决

    2024-01-16 11:56:02       51 阅读
  4. Fastapi打包exe无限启动导致死机的解决办法

    2024-01-16 11:56:02       74 阅读
  5. SpringBoot 循环引用解决办法

    2024-01-16 11:56:02       32 阅读
  6. vue多tab页面全部关闭自动退出登录

    2024-01-16 11:56:02       56 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-01-16 11:56:02       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-01-16 11:56:02       100 阅读
  3. 在Django里面运行非项目文件

    2024-01-16 11:56:02       82 阅读
  4. Python语言-面向对象

    2024-01-16 11:56:02       91 阅读

热门阅读

  1. Linux中的numactl命令使用详解

    2024-01-16 11:56:02       52 阅读
  2. (程序员专用简历助手)Prompt提示词

    2024-01-16 11:56:02       55 阅读
  3. Linux 安装 Mysql5.7(glibc版)

    2024-01-16 11:56:02       50 阅读
  4. apache排障

    2024-01-16 11:56:02       57 阅读
  5. Github Copilot 的使用方法和快捷键

    2024-01-16 11:56:02       80 阅读
  6. ARCGIS PRO SDK 地图图层单一符号化_____线图层

    2024-01-16 11:56:02       57 阅读