@Async asynchronous Notes @EnableAsync

@SpringBootApplication
@ComponentScan(basePackages = "com.fddsfsg")
//@EnableSwagger2
@EnableAsync  //启动异步
public class GunsRestApplication {
    public static void main(String[] args) {
        SpringApplication.run(GunsRestApplication.class, args);
    }
}
    @Async // asynchronous function annotation 
    @Transactional // transaction 
    public  void updateCarBrandLogo () {}

 

Guess you like

Origin www.cnblogs.com/dianzan/p/11285528.html