@Async 异步注释 @EnableAsync

@SpringBootApplication
@ComponentScan(basePackages = "com.fddsfsg")
//@EnableSwagger2
@EnableAsync  //启动异步
public class GunsRestApplication {
    public static void main(String[] args) {
        SpringApplication.run(GunsRestApplication.class, args);
    }
}
    @Async  //异步函数注释
    @Transactional  //事务
    public void updateCarBrandLogo() {}

 

posted @ 2019-08-01 21:35  ThisCall  阅读(323)  评论(0编辑  收藏  举报