Springboot ,1开启配置与2.扫描包(控制层,service层)二个注解@EnableAutoConfiguration,@ComponentScan 合并成一个注解@SpringBootApplication

//@EnableAutoConfiguration
//@ComponentScan(value= {"com.foen.cloud.controller.*","com.foen.cloud.service.impl"})
@SpringBootApplication(scanBasePackages= {"com.foen.cloud.controller.*","com.foen.cloud.service.impl"})

 

 

@SpringBootApplication(@EnableAutoConfiguration,ComponentScan)

文章来自:https://www.cnblogs.com/gzhbk/p/9692782.html
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3