Spring Boot启动后直接没有任何警告报错信息,打印`Process finished with exit code 0`直接退出

简介: Spring Boot启动后直接没有任何警告报错信息,打印`Process finished with exit code 0`直接退出

Spring Boot启动后直接没有任何警告报错信息,打印Process finished with exit code 0直接退出

日志:

2023-02-10 22:27:50.148  INFO 8231 --- [           main] com.example.utils.BlogUtilsApplication   : Starting BlogUtilsApplication using Java 11.0.17 on 192.168.2.100 with PID 8231 (/Users/zhangsan/code/java/idea/ipRegion/blog-utils/target/classes started by zhangsan in /Users/zhangsan/code/java/idea/ipRegion)
2023-02-10 22:27:50.149  INFO 8231 --- [           main] com.example.utils.BlogUtilsApplication   : No active profile set, falling back to 1 default profile: "default"
2023-02-10 22:27:50.333  INFO 8231 --- [           main] com.example.utils.BlogUtilsApplication   : Started BlogUtilsApplication in 0.301 seconds (JVM running for 0.518)
Process finished with exit code 0

主要核心原因有以下两种情况

  1. 微服务没有继承父工程
  2. 微服务没有添加springboot的web环境
  • 微服务没有继承父工程

检查了一遍,发现blog-utils这个module里的pom.xml里确实没有继承父module工程ipRegion

需要到父module下的pom.xml里添加上子module的名字,如下图所示:

在ipRegion的pom.xml添加下面几行:

<modules>
        <module>blog-utils</module>
    </modules>

  • 微服务没有添加springboot的web环境

需要看下项目中的pom.xml里有没有添加spring-boot-starter-web的依赖,没有的话需要引入

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


相关文章
|
2天前
|
Java
SpringBoot启动报错:org.apache.catalina.LifecycleException: Protocol handler start failed
SpringBoot启动报错:org.apache.catalina.LifecycleException: Protocol handler start failed
29 0
|
2天前
|
Java
SpringBoot启动报错org.apache.catalina.LifecycleException
SpringBoot启动报错org.apache.catalina.LifecycleException
11 0
|
2天前
|
监控 Java API
Spring cloud Hystrix 、Dashboard、API(zuul)相关报错
Spring cloud Hystrix 、Dashboard、API(zuul)相关报错
17 2
|
2天前
|
Java 测试技术 Maven
Spring Boot单元测试报错java.lang.IllegalStateException: Could not load TestContextBootstrapper [null]
Spring Boot单元测试报错java.lang.IllegalStateException: Could not load TestContextBootstrapper [null]
|
2天前
|
Dubbo Java 应用服务中间件
启动tomcat时,卡主在信息: Initializing Spring FrameworkServlet 'e3-manager'
启动tomcat时,卡主在信息: Initializing Spring FrameworkServlet 'e3-manager'
13 0
|
2天前
|
小程序 JavaScript Java
基于SpringBoot+Vue+uniapp微信小程序的学生公寓电费信息的详细设计和实现
基于SpringBoot+Vue+uniapp微信小程序的学生公寓电费信息的详细设计和实现
37 1
|
2天前
|
Java 数据库连接 Spring
spring配合hibernate报错:sessionFactory or hibernateTemplate is required
根据你的具体情况,检查上述步骤中的一个或多个,以确定为何出现“sessionFactory or hibernateTemplate is required”错误,并采取相应的措施进行修复。 买CN2云服务器,免备案服务器,高防服务器,就选蓝易云。百度搜索:蓝易云
7 0
|
2天前
|
消息中间件 运维 供应链
springboot区域云HIS医院信息综合管理平台源码
云HIS系统分为两个大的系统,一个是基层卫生健康云综合管理系统,另一个是基层卫生健康云业务系统。基层卫生健康云综合管理系统由运营商、开发商和监管机构使用,用来进行运营管理、运维管理和综合监管。基层卫生健康云业务系统由基层医院使用,用来支撑医院各类业务运转。
23 2
|
2天前
|
存储 关系型数据库 MySQL
【mybatis-plus】Springboot+AOP+自定义注解实现多数据源操作(数据源信息存在数据库)
【mybatis-plus】Springboot+AOP+自定义注解实现多数据源操作(数据源信息存在数据库)
|
2天前
|
安全 Java
Springboot2.1.1版本升级到2.3.10版本报错合集及解决办法
Springboot2.1.1版本升级到2.3.10版本报错合集及解决办法