@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() {}