02 2023 档案

摘要:使用场景:需要执行某个方法但不需等待该方法的执行结果或者需要执行多个方法但这些方法不需要先后执行,可以通过声明并调用异步方法实现.因为每执行一个异步方法都需要从线程池中申请并占用一个线程,为避免线程资源过度损耗,需要自行维护线程池。 1 启动类上加 @EnableAsync 表示开启异步注解 2 c 阅读全文
posted @ 2023-02-15 10:53 杨吃羊 阅读(61) 评论(0) 推荐(0) 编辑
摘要:登陆controller: package login; import batch.User; import com.alibaba.fastjson.JSONObject; import org.springframework.beans.factory.annotation.Autowired; 阅读全文
posted @ 2023-02-09 10:45 杨吃羊 阅读(1091) 评论(0) 推荐(0) 编辑
摘要:contriller: package batch; import com.alibaba.fastjson.JSONObject; import org.springframework.beans.factory.annotation.Autowired; import org.springfra 阅读全文
posted @ 2023-02-07 09:19 杨吃羊 阅读(1235) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示