arthas 操作文档
先来一个骚操作
记录
tt -t org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter invokeHandlerMethod -n 5 '1==1'
取上下文
tt -i 1002 -w 'target.getApplicationContext().getBean("userDetailsServiceImpl").loadUserByUsername(" ")'
打印所有env
tt -i 1002 -w '#springContext=target.getApplicationContext(),#allProperties={},#standardServletEnvironment=#propertySourceIterator=#springContext.getEnvironment(),#propertySourceIterator=#standardServletEnvironment.getPropertySources().iterator(),#propertySourceIterator.{#key=#this.getName(),#allProperties.add(" "),#allProperties.add("------------------------- name:"+#key),#this.getSource() instanceof java.util.Map ?#this.getSource().entrySet().iterator.{#key=#this.key,#allProperties.add(#key+"="+#standardServletEnvironment.getProperty(#key))}:#{}},#allProperties' -x 3