springboot报错:A bean with that name has already been defined in file

springboot报错:A bean with that name has already been defined in file 

Action :

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

解决办法:在application.properties中添加如下一句话:

spring.main.allow-bean-definition-overriding=true

完美解决

你可能感兴趣的:(SpringBoot)