Springboot项目报错

报错:
Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled.

java.lang.IllegalStateException: Failed to execute CommandLineRunner

Caused by: org.springframework.data.redis.connection.PoolException: Could not get a resource from the pool; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to localhost:6379

Caused by: io.lettuce.core.RedisConnectionException: Unable to connect to localhost:6379

在这里插入图片描述
因为是第一次运行spring boot项目,大概率是因为没有安装redis,redis服务没有开启导致。

参考文章:
SpringBoot项目报错解决:“Error starting ApplicationContext. To display the conditions report re-run …”

Could not get a resource from the pool; nested exception is io.lettuce.core.RedisConnectionException

安装redis并开启redis服务后,可进行运行
在这里插入图片描述

  • 8
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
当创建SpringBoot项目时,如果出现类似于“Error:(3,32) java: 无法访问org.springframework.boot.SpringApplication”的信息,通常是由于SpringBoot的版本和IDEA中Maven的不兼容引起的。为了解决这个问题,你可以按照以下步骤进行操作: 1. 打开项目中的pom.xml文件。 2. 在pom.xml文件中找到与Spring Boot相关的依赖项。 3. 修改spring boot的版本为3.0.0 版本以下。你可以在<parent>标签下找到<version>标签,将其修改为2.7.7-SNAPSHOT或更低的版本。 4. 保存并关闭pom.xml文件。 5. 在IDEA中右键单击项目,选择"Maven",然后选择"Reload Project",以重新加载项目的依赖项。 6. 重新运行项目,查看是否问题已解决。 通过以上操作,你应该能够解决IDEA中SpringBoot项目的问题,并成功运行项目。如果问题仍然存在,请检查其他可能的误原因,比如项目配置文件或代码误。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* [解决IDEA创建springboot项目:Error:(3,32) java: 无法访问org.springframework.boot....](https://blog.csdn.net/qq_51917985/article/details/128365245)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *3* [idea启动springBoot项目](https://blog.csdn.net/zhanghaisong_2015/article/details/119997656)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值