SpringbootApplication

@SpringbootApplication

   使用@SpringbootApplication注解  可以解决根类或者配置类(我自己的说法,就是main所在类)头上注解过多的问题,一个@SpringbootApplication相当于@Configuration,@EnableAutoConfiguration和 @ComponentScan 并具有他们的默认属性值

猜你喜欢

转载自blog.csdn.net/bossxiaokai/article/details/86072166