项目场景:

提示:在公司的时候,遇到一些问题,将项目带回家打包运行:

开始都挺正常的,自动导包什么都没有报错,运行前端也没有什么问题,直到我运行后端,终于出错了


问题描述

报错内容:org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘captchaController’: Unsatisfied dependency expressed through field ‘configService’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sysConfigServiceImpl’: Invocation of init method failed; nested exception is org.springframework.data.redis.RedisConnectionFailureException: Unable to connect to Redis; nested exception is 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 192.168.0.206:6379 一大段,其实,就一句关键的Could not get a resource from he pool; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to 192.168.0.206:6379

@Override
	public void run() {
		bytes = mmInStream.read(buffer);
		mHandler.obtainMessage(READ_DATA, bytes, -1, buffer).sendToTarget();
	}

原因分析:

其实内容很简单:就是说无法连接到该端口,


解决方案:

找到你自己项目的application.yml文件,找到redis的配置,改成你自己电脑的端口号就行了。

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐