今天在使用arthas发现这个问题
1.下载arthas相关包
2.启动本地服务
3.启动 arthas
java -jar arthas-boot.jar
4.使用trace 包名+类名 方法名
trace com.example.demo.controller.SendMailController SendSimpleMessage
5.调用需要监控的接口
6.监控到具体方法中的花费时间信息,看哪个方法花费的时间多,进行优化。
7.出现上诉标题中的问题是我包名+类名+方法名trace错了,
错误拼接
trace com.example.demo.controller SendSimpleMessage
正确拼接
trace com.example.demo.controller.SendMailController SendSimpleMessage
问题解决,nice