arextest / arex-agent-java

Lightweight Java agent for traffic capture and replay, enhancing testing and debugging.
https://doc.arextest.com/
Apache License 2.0
444 stars 91 forks source link

feat: supports parse positionalParameter in hibernate #439

Closed llkkk closed 5 months ago

llkkk commented 5 months ago

支持解析 hibernate 位置参数。

原逻辑只处理了 hql 的命名参数,没有处理位置参数,若查询语句为:

Query query=session.createQuery(“from User user where user.id=?”); 
query.setInteger(0, 410); 

则会记录不到参数,直接返回 null:

image

修改后效果:

image
sonarcloud[bot] commented 5 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud