当前位置: 首页 > news >正文

新浪博客怎么做网站苏州吴江太湖新城建设局网站

新浪博客怎么做网站,苏州吴江太湖新城建设局网站,企业网站托管套餐,wordpress显示文章列表的主题场景: 线上环境我想查看spring中容器某个对象的属性值 vmtool命令 方式一: vmtool --action getInstances -c [类加载器的hash] --className [目标类全路径] --limit 10 -x 2 实例:查询该类的全部属性情况(该类是一个spri…

场景:

线上环境我想查看spring中容器某个对象的属性值

vmtool命令

方式一:

 vmtool --action getInstances -c   [类加载器的hash]    --className  [目标类全路径]  --limit 10 -x 2

 实例:查询该类的全部属性情况(该类是一个spring中容器的对象,因此可以直接可以看到线上运行的属性值情况

 vmtool --action getInstances -c 7637f22   --className com.gisquest.cloud.oauth2.authentication.GisqAuthenticationSuccessHandler  --limit 10 -x 2

方式二:

语法:

 vmtool --action getInstances    -c [类加载器的hash] --className [org.springframework.web.context.WebApplicationContext]--express 'instances[0].getBean("对象名")' 

实例:查询spring容器中的某个对象

 vmtool --action getInstances    -c [ 7637f22] --className [org.springframework.web.context.WebApplicationContext]--express 'instances[0].getBean("gisqAuthenticationSuccessHandler")' 

语法:

 vmtool --action getInstances -c 7637f22   --className 【容器全路径】--express 'instances[0].getBean("实例对象名").【属性名】' 

实例:查询spring容器中的某个对象的某个属性值

 vmtool --action getInstances -c 7637f22   --className org.springframework.web.context.WebApplicationContext --express 'instances[0].getBean("gisqAuthenticationSuccessHandler").needUpdatePwdTime' 

可能遇到的问题 :

问题一:参照官网直接复制 org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named

  vmtool --action getInstances  --className org.springframework.context.ApplicationContext --express 'instances[0].getBean("gisqAuthenticationSuccessHandler")' 
Failed to execute ognl, exception message: ognl.MethodFailedException: Method "getBean" failed for object org.springframework.context.annotation.AnnotationConfigApplicationContext@91161c7, started on Tue Feb 07 11:08:21 CST 2023 [org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'gisqAuthenticationSuccessHandler' available], please check $HOME/logs/arthas/arthas.log for more details. 
[arthas@1]$ 

 原因:在实际的项目中往往是web容器,因此容器全类名需要根据实际情况改动。

 vmtool --action getInstances  --className org.springframework.web.context.WebApplicationContext --express 'instances[0].getBean("gisqAuthenticationSuccessHandler")' 

问题二:获取当前类是那个类加载器加载的

sc -d 【目标类】

 实例:

sc -d com.gisquest.cloud.oauth2.authentication.GisqAuthenticationSuccessHandler

http://www.yayakq.cn/news/191380/

相关文章:

  • 淘宝内部券网站建设网站开发备案
  • 免费网站建设ydwzjs伍佰亿网站建设
  • 深圳网站建设行业排行网站网站怎么优化关键词排名
  • 苏州知名网站制作极速建站
  • 网站建设永远在路上和县网站定制
  • 阿里云虚拟主机网站建设动漫网站设计理念
  • 做58同城的网站要多少钱德州网站建设哪家专业
  • 网站开发过时了莱芜拉呱
  • 音乐网站开发目的深圳租赁住房和建设局网站
  • 什么是建设网站工具菜鸟移动端网站开发
  • 网站建设技术公司排名安阳网站公司
  • 最好用的网站建设软件外贸推广网站哪家
  • 网站icp备案信息温州电子商务网站建设
  • 建设网站计划 ppt昆明seo优化
  • wordpress 企业站主题广州越秀建网站的公司
  • 中国有多少个网站大型网站制作公司
  • 外包做网站赚钱么湖南人文科技学院在哪个城市
  • 做抽奖网站违法吗wordpress 开源模板
  • php手机网站后台源码wordpress链接跳转页面跳转
  • 企查查官网查企业网页版谷歌seo运营
  • 网站运营技巧濮阳新闻综合频道直播
  • 网站界面网上购物软件哪个好
  • 桂城网站设计电脑做系统教学网站
  • 网站没备案可以做商城吗app与网站的区别是什么
  • 公司网站手机版模板下载如何做电商网站分析报告
  • 建设久久建筑网站十大短视频平台排行榜
  • 在线做任务的网站厦门网站制作阳哥
  • 洛阳建站洛阳市网站建设小程序注册收费吗
  • 成都seo网站开发沈阳网站制作平台
  • 北碚区建设银行网站南阳专业做网站公司哪家好