springboot 异步任务

1、 1: 启动类里面使用@EnableAsync注解开启功能,自动扫描 2:在要异步任务的类上写@component 3:在定义异步任务类写@Async(写在类上表明整个类都是异步,在方法加上表明该类异步执行) 主类html @SpringBootApplication @EnableAsync //开启异步任务 @MapperScan("com.qdd.api.mapper.generat
相关文章
相关标签/搜索