@Test
public void show() {
System.out.println(Thread.currentThread() .getStackTrace()[1].getClassName()+":"+Thread.currentThread() .getStackTrace()[1].getMethodName());
}
eg:com.mishimao.mishimao_api.MishimaoApiApplicationTests:show
@Test
public void show() {
System.out.println(Thread.currentThread() .getStackTrace()[1].getClassName()+":"+Thread.currentThread() .getStackTrace()[1].getMethodName());
}
eg:com.mishimao.mishimao_api.MishimaoApiApplicationTests:show
本文标题:1.获取当前执行的类和方法名
本文链接:https://www.haomeiwen.com/subject/afdivftx.html
网友评论