最近做mybatis+oracle项目的时候解决添加一条数据并返回所添加数据的主键问题 controller层 @RequestMapping("/addplan") public @ResponseBody OnlineAddplanWithBLOBs insertOnlineAddplan(OnlineAddplanWithBLOBs plan) throws Exception{ //plan是添加的数据,planid为数据主键,此时对象中主键为null int n = serv…
等待多个子线程结束后再执行主线程 class MultiThread{ #region join test public void MultiThreadTest() { Thread[] ths = new Thread[2]; ths[0] = new Thread(Method1); ths[1] = new Thread(Method2); foreach (Thread item in ths) { //首先让所有线程都启动 item.Start(); //试想一下在这里加上item.…