今天在升级spring boot2.1.2的时候出现如下异常
Description:
The bean 'clientDetailsService', defined in com.codeus.wecode.service.DBClientDetailsService, could not be registered. A bean with that name has already been defined in BeanDefinition defined in class path resource [org/springframework/security/oauth2/config/annotation/configuration/ClientDetailsServiceConfiguration.class] and overriding is disabled.
Action:
Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true
其实提示里面已经给出了解决方法:
设置如下属性即可
spring.main.allow-bean-definition-overriding=true