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)

posted @ 2018-09-23 15:15  A汉克先生  阅读(5632)  评论(0编辑  收藏  举报