首页 > 其他分享 >Arthas访问bean对象

Arthas访问bean对象

时间:2023-07-24 17:56:23浏览次数:32  
标签:cn seenew -- 31cefde0 payorder 访问 bean Arthas utils

在使用Arthas中ognl命令时需要指定加载目标类的ClassLoader,所以需要先得到classLoader的hashCode

sc -d cn.seenew.habe.business.payorder.utils.UniPayParamFromDB  # 1.通过目标类名获取classLoader的hashCode【31cefde0】,利用这个hashCode访问bean

vmtool -x 3 --action getInstances --className cn.seenew.habe.business.payorder.utils.UniPayParamFromDB --express 'instances[0].uniPayPropVO.getWeChatMsgSrcId()' -c 31cefde0  # 调用静态成员变量的方法

vmtool -x 3 --action getInstances --className cn.seenew.habe.business.payorder.utils.UniPayParamFromDB --express 'instances[0].getMerchantIdByOrgCode('11')' -c 31cefde0  # 访问成员方法

vmtool -x 3 --action getInstances --className cn.seenew.habe.business.payorder.utils.UniPayParamFromDB --express 'instances[0].uniPayHosConfigVOList' -c 31cefde0  # 访问静态字段

vmtool -x 3 --action getInstances --className cn.seenew.habe.business.payorder.utils.UniPayParamFromDB --express 'instances[0].payChannelEntityMapper' -c 31cefde0  # 访问注入的bean

vmtool -x 3 --action getInstances --className cn.seenew.habe.business.payorder.utils.UniPayParamFromDB --express 'instances[0].uniPayHosConfigVOList.get(1)' -c 31cefde0  # 访问静态集合中的元素

标签:cn,seenew,--,31cefde0,payorder,访问,bean,Arthas,utils
From: https://www.cnblogs.com/JaxYoun/p/17577907.html

相关文章

  • SpringBoot源码第四章-invokeBeanFactoryPostProcessors
    invokeBeanFactoryPostProcessors()实例化和调用所有BeanFactoryPostProcessorprotectedvoidinvokeBeanFactoryPostProcessors(ConfigurableListableBeanFactorybeanFactory){ PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(beanFactory,getBeanFa......
  • windows11中访问ubuntu双系统文件目录
    1、下载linuxreader(免费版)AccesstoExt2/3/4,HFSandReiserFSfromWindows|DiskInternals2、安装打开后找到ubuntu分区 3、想保存什么文件右键Save就行了 ......
  • Java 诊断工具 Arthas 常见命令(超详细实战教程)
    基本概念  云原生这么多微服务,当然需要一个诊断利器来排查问题。  Arthas是阿里开源的Java诊断工具,深受开发者喜爱。在线排查问题,无需重启;动态跟踪Java代码;实时监控JVM状态。Arthas支持JDK6+,支持Linux/Mac/Windows,采用命令行交互模式,同时提供丰富的Tab......
  • Python爬虫实战之提高CSDN访问量
    python爬虫之建立代理池(一)_CodingInCV的博客-CSDN博客python爬虫之建立代理池(二)_CodingInCV的博客-CSDN博客前面2篇分别介绍了从2个免费代理网站爬取免费代理来构建我们自己的代理池。这一篇我们从实战的角度来将我们的代理池用起来,通过代理的方式访问我们的CSDN博客(CSDN会认为......
  • 编写APP直接访问EEPROM
    编写APP直接访问EEPROM参考资料:Linux驱动程序:drivers/i2c/i2c-dev.cI2C-Tools-4.2:https://mirrors.edge.kernel.org/pub/software/utils/i2c-tools/AT24cxx.pdf本节源码:GIT仓库中doc_and_source_for_drivers\IMX6ULL\source\04_I2C\01_at24c02_testdoc_and......
  • SpringBoot 自动装载 Bean
    我们在工作中经常会遇到这样的场景,我们写了很多非常实用的工具类,这些类在多个项目工程中使用非常频繁。如果在每个要使用的项目工程中都去编写加载bean的代码的话,那么重复的代码就太多了。如果你想追求完美只写一份代码的话,使用SpringBoot的自动装载的特性是一个很不错的方案......
  • JVAA springboot 项目启动后,localhost加端口可以访问,但是外网IP不行// OCPP KYOHOON
     现象javaspringboot项目启动后,localhost(或127.0.0.1)加端口可以访问,但是使用外网IP却无法访问。   原因及解决方法springboot的配置文件(yml或properties)中缺少server.address的设置。解决方法:在springboot的配置文件中增加server.address的配置。yml配......
  • JavaBean 跟类 区别
    JavaBean跟类区别在Java编程中,JavaBean和类是两个非常重要的概念。它们在语法和用途上存在一些区别。本文将介绍JavaBean和类之间的区别,并通过代码示例进行说明。1.类的定义在Java中,一个类是一个抽象的概念,用于描述具有相同属性和行为的对象的模板。类由属性和方法组成,用于定......
  • arthas 使用教程
    https://blog.csdn.net/qq_19524879/article/details/126116050简介Arthas是Alibaba开源的Java诊断工具,动态跟踪Java代码;实时监控JVM状态,可以在不中断程序执行的情况下轻松完成JVM相关问题排查工作。支持JDK6+,支持Linux/Mac/Windows。这个工具真的很好用,而且入门超简单,十......
  • Arthas浅用
    安装curl-Ohttps://arthas.aliyun.com/arthas-boot.jar使用java-jararthas-boot.jar--target-ip192.168.150.38##可以在浏览器上访问http://192.168.150.38:3658/##常用命令##看板dashboard##dump文件heapdump--live/tmp/dump.hprof##火焰图profilers......