/** * 获取当前执行的方法名 */ public static String testMethodName(){ return new Exception().getStackTrace()[0].getMethodName(); }