2024年5月31日发(作者:)
/*tTransactionStatus().setRollbackOnly();
throw new RuntimeException();*/
/*for (TransactionStatus transactionStatus:transactionStatuses) {
lbackOnly();
}*/
}
}
}
/**
* 多线程争夺全局资源
* @param args
*/
public static void main(String[] args){
for(int a=0 ;a<100;a++){
ThreadOperation2 threadOperation2 = new ThreadOperation2();
Thread innerThread = new Thread(threadOperation2);
();
}
n(countTest);
}
public static class ThreadOperation2 implements Runnable {
@Override
public void run() {
countTest++;
}
}
}
TestService:
package e;
import 2;
import 3;
/**
* Created by liuyachao on 2018/9/3.
*/
public interface TestService {
int saveUser2(User2 user2);
User3 getUser3List(User3 user3);
void threadMethod();
}
TestBService:
package e;
import 2;
import 3;
/**
* Created by liuyachao on 2018/9/3.
*/
public interface TestBService {
int saveUser2 (User2 user2);
User3 getUser3List(User3 user3);
}
TestBServiceImpl:
package ;
import 2;
import 3;
import 2Mapper;
import 3Mapper;
import ervice;
import rvice;
import 4j;
import red;
import e;
import ation;
import ctional;
import ctionAspectSupport;


发布评论