publicclassUserServiceImplimplementsUserService{@Overridepublicbooleanadd(String name,String password){long st =System.currentTimeMillis();if("admin".equals(name)&&"123".equals(password)){System.out.println("登录成功");try{Thread.sleep(1000);}catch(InterruptedException e){
e.printStackTrace();}finally{long et =System.currentTimeMillis();long rs = et - st;System.out.println("add方法所消耗时间: "+ rs);}returntrue;}returnfalse;}@Overridepublicvoidupdate(){long st =System.currentTimeMillis();System.out.println("修改了100个信息。。。。");try{Thread.sleep(2000);}catch(InterruptedException e){
e.printStackTrace();}finally{long et =System.currentTimeMillis();long rs = et - st;System.out.println("update方法所消耗时间: "+ rs);}}@Overridepublicvoiddelete(){long st =System.currentTimeMillis();System.out.println("删除了100个信息。。。。");try{Thread.sleep(2000);}catch(InterruptedException e){
e.printStackTrace();}finally{long et =System.currentTimeMillis();long rs = et - st;System.out.println("delete方法所消耗时间: "+ rs);}}}