spring boot 无法启动 相关问题

用原来的dev能正常启动,但换成自己新添加的yml文件,却无法启动

一行日志都没有,只有这一行:
Disconnected from the target VM, address: '127.0.0.1:63190', transport: 'socket'

其实是启动起来了的,只是logback-sprint中根据环境配置了日志打印,而我新添的环境没有配置进去。

 

SpringBoot的redis启动报错:ERR This instance has cluster support disabled

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationAspect': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionHelper': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'appUserAccessTokenCacheOperator': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cacheInvoker': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'redisTemplate' defined in class path resource [com/yangdj/sa/japi/commons/config/RedisConfig.class]: Unsatisfied dependency expressed through method 'redisTemplate' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisConnectionFactory' defined in class path resource [org/springframework/boot/autoconfigure/data/redis/JedisConnectionConfiguration.class]: Invocation of init method failed; nested exception is redis.clients.jedis.exceptions.JedisDataException: ERR This instance has cluster support disabled

从报错误的信息ERR This instance has cluster support disabled很明显看得出来,是没有启动redis集群功能,可是我项目配置的集群的配置方式,要么修改代码为单机配置,要么修改redis为集群方式。

解决办法:
1、可以修改配置为单机redis配置:
spring:
redis:
host: qianxunclub.com
port: 6666

2、或者在安装redis的目录找到redis配置文件redis.conf,里面会找到配置:
# cluster-enabled yes
把注释去掉就可以了
cluster-enabled yes

posted @   流失的痕迹  阅读(693)  评论(0编辑  收藏  举报
编辑推荐:
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 一个奇形怪状的面试题:Bean中的CHM要不要加volatile?
· [.NET]调用本地 Deepseek 模型
阅读排行:
· Blazor Hybrid适配到HarmonyOS系统
· Obsidian + DeepSeek:免费 AI 助力你的知识管理,让你的笔记飞起来!
· 分享4款.NET开源、免费、实用的商城系统
· 解决跨域问题的这6种方案,真香!
· 一套基于 Material Design 规范实现的 Blazor 和 Razor 通用组件库
点击右上角即可分享
微信分享提示