记一次异常 Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-de

配置RedisTokenStore后,启动程序时出现了: Description:The bean redisTokenStore, defined in class path resource





配置RedisTokenStore后,启动程序时出现了:

Description:

The bean 'redisTokenStore', defined in class path resource [com/auth/redis/RedisTokenStoreConfig.class], could not be registered. A bean with that name has already been defined in class path resource [com/auth/config/AuthorizationServerConfig.class] and overriding is disabled.

Action:

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




原因是因为自定义的bean重名了,在yml中配置:

spring:
  main:
    allow-bean-definition-overriding: true



发布者:admin,转转请注明出处:http://www.yc00.com/web/1738334403a4038585.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信