最新消息: USBMI致力于为网友们分享Windows、安卓、IOS等主流手机系统相关的资讯以及评测、同时提供相关教程、应用、软件下载等服务。

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

业界 admin 2浏览 0评论




配置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







配置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



发布评论

评论列表 (0)

  1. 暂无评论