解决方法:
spring: main: allow-bean-definition-overriding: true
参考博客:https://www.cnblogs.com/lifelikeplay/p/14085256.html