Annotation-specified bean name 'globalExceptionHandler' for bean class [com.yygh.common.exception.GlobalExceptionHandler] conflicts with existing,
non-compatible bean definition of same name and class [com.hospital.config.GlobalExceptionHandler]
在springboot的启动类上添加 @ComponentScan("com.hospital")注解去屏蔽不想要去扫描的包。我个人认为这个方法有很多的不妥,以后需要用到那个模块可能还要重新去添加扫描。