@ComponentScan使用后会导致spring自己的自动配置失效 @SpringBootApplication它是有@ComponentScan 如果再在启动类加入这个注解,就会导致它自己的失效。不会去自动注册加载配置类