Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

您好,请问arthas的ognl执行方法的方式,可以把一个字符串给变成一个对象入参吗 #2821

Open
itqiankun opened this issue Apr 25, 2024 · 2 comments

Comments

@itqiankun
Copy link

就像下面这样使用,其中JSONObject.parseObject是想把字符串给变成一个入参对象,这样就方便使用了。

ognl -x 3 '#req = com.alibaba.fastjson.JSONObject.parseObject('{"desc":true,"buyerNick":"嗯嗯","authorizerAppId":"cdd99f9c25724c67a4549e3e427f2d9d","index":1,"offset":0,"pageNum":1,"pageSize":100,"pages":0,"size":10,"span":10,"total":0,"openId":"3104620296282989"}', com.itqiankun.api.request.TradeRequest.class),#springContext=@com.alibaba.dubbo.config.spring.extension.SpringExtensionFactory@contexts.iterator.next,#springContext.getBean("tradeService").queryList(#req)' -c 21b8d17c

@WangJi92
Copy link
Contributor

#71 参考一下这个 复杂参数调用 使用Json 转换为具体的类信息

@itqiankun
Copy link
Author

itqiankun commented Apr 28, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants