当前位置:网站首页>ThreadPoolExecutor implements file uploading and batch inserting data
ThreadPoolExecutor implements file uploading and batch inserting data
2022-06-26 04:53:00 【RabbitMq_ mr wang】
One : stay run() Method to insert
package com.smartdata.pms.thread;
import com.smartdata.pms.entity.PmsProduct;
import com.smartdata.pms.mapper.PmsProductMapper;
import lombok.extern.slf4j.Slf4j;
import java.util.List;
/**
* @ProjectName: smartdata
* @Package: com.smartdata.pms.thread
* @ClassName: InsertBatchRun
* @Author: heluwei
* @Description:
* @Date: 2020/3/22 16:36
* @Version: 1.0
*/
@ Slf4j
public class InsertBatchRun implements Runnable {
// Data layer access
private PmsProductMapper pmsProductMapper;
// Insert the batch
private int batch;
// Inserted data
private List < PmsProduct > list;
public InsertBatchRun(PmsProductMapper pmsProductMapper, List < PmsProduct > list, int batch) {
this.pmsProductMapper = pmsProductMapper;
this.list = list;
this.batch = batch;
}
@ Override
public void run() {
try {
for (int i 边栏推荐
猜你喜欢

1.19 learning summary

Image translation /gan:unsupervised image-to-image translation with self attention networks

UWB超高精度定位系统架构图

超高精度定位系统中的UWB是什么

torchvision_transform(图像增强)

A new paradigm for large model application: unified feature representation optimization (UFO)

2.22.2.14

1.24 learning summary

Illustration of ONEFLOW's learning rate adjustment strategy
![[H5 development] 01 take you to experience H5 development from a simple page ~ the whole page implementation process from static page to interface adjustment manual teaching](/img/e4/27611abdd000019e70f4447265808c.jpg)
[H5 development] 01 take you to experience H5 development from a simple page ~ the whole page implementation process from static page to interface adjustment manual teaching
随机推荐
[H5 development] 02 take you to develop H5 list page ~ including query, reset and submission functions
Multipass Chinese document - use multipass service to authorize the client
Comment enregistrer une image dans une applet Wechat
2022.1.23
PSIM software learning ---08 call of C program block
Multipass Chinese document - use instance command alias
Some parameter settings and feature graph visualization of yolov5-6.0
Text horizontal alignment attribute text align and element vertical alignment attribute vertical align
Image translation /gan:unsupervised image-to-image translation with self attention networks
Difference between return and yield
Floyd
Multipass Chinese document - use packer to package multipass image
2022.2.11
Introduction to classification data cotegory and properties and methods of common APIs
微信小程序保存圖片的方法
Use of better scroll
22.2.8
dijkstra
What is the best way to store chat messages in a database? [Close] - best way to store chat messages in a database? [closed]
Zhimeng CMS will file a lawsuit against infringing websites