gateway 内存溢出问题_spring - Spring Cloud Gateway服务器启动期间出现问题? - 堆栈内存溢出...

在Spring Cloud微服务系统中,一个使用Spring Cloud Gateway作为入口点的应用在启动时遇到内存溢出问题和bean定义冲突。具体表现为'sessionRepository' bean在两个配置类中被定义,导致无法注册。解决方案可能包括检查和调整依赖关系,或者启用bean定义覆盖。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

我有一个简单的Spring Cloud微服务系统。 我在应用程序中有一个Cloud Gateway服务器。 它在Eureka中注册,获取Config Server的地址并自行下载配置。

该网关服务将是登录的地方,并且还会找到正确的微服务,即客户真正想要调用的服务。 它使用Redis进行会话处理和分发。

但是在启动过程中,我看到此失败:

***************************

APPLICATION FAILED TO START

***************************

Description:

The bean 'sessionRepository', defined in class path resource [org/springframework/boot/autoconfigure/session/RedisReactiveSessionConfiguration$SpringBootRedisWebSessionConfiguration.class], could not be registered. A bean with that name has already been defined in class path resource [org/springframework/session/data/redis/config/annotation/web/http/RedisHttpSessionConfiguration.class] and overriding is disabled.

Action:

Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true

[WARNING]

java.lang.reflect.InvocationTargetException

at jdk

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值