Spring Boot 启动错误:To display the conditions report re-run your application with ‘debug‘ enable —【已解决】

简介: Spring Boot 启动错误:To display the conditions report re-run your application with ‘debug‘ enable —【已解决】

对于初学SpringBoot、 maven ,或者入门不久的攻城狮们,这种框架的问题,粘贴到 baidu google 是最快的解决办法


针对上面的问题,相信你已经修改了自己的 application.yml

  1. mvn clean compile 重新编译

换不行??

  1. 重载maven缓存

重新导入依赖的常见方式

  下面图中的刷新按钮,在我的机器上,并不能每次都正确导入pom.xml中写的依赖项,而是导入之前pom.xml的依赖(读了缓存中的pom.xml)。

  


存在的问题

  上面虽然是重新导入Maven依赖,按理说,IDEA应该根据当前最新的pom.xml来导入依赖;

reimport操作常常不能导入当前最新的pom.xml中规定的依赖,因为有一种东西叫“缓存”,IDEA在每次打开项目的时候,就会产生缓存(为了提升运行速度和效率),但是此时,却很头疼。


虽然有时候重启IDEA能够解决缓存问题,只能说是有时候,并不能总是成功,下面介绍一种清空整个IDEA缓存的方式。

彻底清除缓存的方式

  选择下面的Invalidate and Restart即可清空IDEA的缓存,并且重启;注意,下一次重启后,需要比较长的时间来重新构建索引,所以可以找一个空闲时间进行。

目录
打赏
0
1
1
0
137
分享
相关文章
java spring 项目若依框架启动失败,启动不了服务提示端口8080占用escription: Web server failed to start. Port 8080 was already in use. Action: Identify and stop the process that’s listening on port 8080 or configure this application to listen on another port-优雅草卓伊凡解决方案
java spring 项目若依框架启动失败,启动不了服务提示端口8080占用escription: Web server failed to start. Port 8080 was already in use. Action: Identify and stop the process that’s listening on port 8080 or configure this application to listen on another port-优雅草卓伊凡解决方案
97 7
Spring3 Web MVC 集成Jasper Report生成PDF例子
Spring3 Web MVC 集成Jasper Report生成PDF例子
82 7
【SpringBoot】Error starting ApplicationContext. To display the conditions report re--run your app
【SpringBoot】Error starting ApplicationContext. To display the conditions report re--run your app
337 0
|
11月前
|
springboot启动报错:“Error starting ApplicationContext. To display the conditions report re-run your appl
springboot启动报错:“Error starting ApplicationContext. To display the conditions report re-run your appl
1269 0
【Spring】Spring常用配置-事件(Application Event)
转载请注明出处:http://blog.csdn.net/qq_26525215 本文源自【大学之旅_谙忆的博客】 分析 Spring的事件(Application Event)为Bean与Bean之间的消息通信提供了支持。
823 0
微服务——SpringBoot使用归纳——Spring Boot集成MyBatis——基于 xml 的整合
本教程介绍了基于XML的MyBatis整合方式。首先在`application.yml`中配置XML路径,如`classpath:mapper/*.xml`,然后创建`UserMapper.xml`文件定义SQL映射,包括`resultMap`和查询语句。通过设置`namespace`关联Mapper接口,实现如`getUserByName`的方法。Controller层调用Service完成测试,访问`/getUserByName/{name}`即可返回用户信息。为简化Mapper扫描,推荐在Spring Boot启动类用`@MapperScan`注解指定包路径避免逐个添加`@Mapper`
34 0
微服务——SpringBoot使用归纳——Spring Boot集成Thymeleaf模板引擎——Thymeleaf 介绍
本课介绍Spring Boot集成Thymeleaf模板引擎。Thymeleaf是一款现代服务器端Java模板引擎,支持Web和独立环境,可实现自然模板开发,便于团队协作。与传统JSP不同,Thymeleaf模板可以直接在浏览器中打开,方便前端人员查看静态原型。通过在HTML标签中添加扩展属性(如`th:text`),Thymeleaf能够在服务运行时动态替换内容,展示数据库中的数据,同时兼容静态页面展示,为开发带来灵活性和便利性。
35 0
微服务——SpringBoot使用归纳——Spring Boot中的项目属性配置——少量配置信息的情形
本课主要讲解Spring Boot项目中的属性配置方法。在实际开发中,测试与生产环境的配置往往不同,因此不应将配置信息硬编码在代码中,而应使用配置文件管理,如`application.yml`。例如,在微服务架构下,可通过配置文件设置调用其他服务的地址(如订单服务端口8002),并利用`@Value`注解在代码中读取这些配置值。这种方式使项目更灵活,便于后续修改和维护。
18 0
微服务——SpringBoot使用归纳——Spring Boot使用slf4j进行日志记录—— application.yml 中对日志的配置
在 Spring Boot 项目中,`application.yml` 文件用于配置日志。通过 `logging.config` 指定日志配置文件(如 `logback.xml`),实现日志详细设置。`logging.level` 可定义包的日志输出级别,例如将 `com.itcodai.course03.dao` 包设为 `trace` 级别,便于开发时查看 SQL 操作。日志级别从高到低为 ERROR、WARN、INFO、DEBUG,生产环境建议调整为较高级别以减少日志量。本课程采用 yml 格式,因其层次清晰,但需注意格式要求。
39 0