Business requirements:
Example: Bulk INSERT 100,000 user's related event coupon
How to do this: use a fixed 10-size thread pool. and 1000 insert data per processing
Thread class: Note Implementing the Callable<integer> interface is the thread class that can get the return value
public Class Insertbatchthread implements callable<integer> {private int vdate; private int uid; private int count; Private Fundsinfomapper Fundsinfomapper; Private Wmpsdayintermapper Wmpsdayintermapper; Private DataSource DataSource; Public Wmpsdayintermapper Getwmpsdayintermapper () {if (null = = Wmpsdayintermapper) {synchronized ( This) {if (null = = Wmpsdayintermapper) {wmpsdayintermapper = springcontextutils.ge Tbean ("Wmpsdayintermapper"); }}} return wmpsdayintermapper; } public Fundsinfomapper Getprocommfundsinfomapper () {if (null = = Fundsinfomapper) {synch Ronized (this) { JAVA concurrent programming-application article