New Features of Cool Request Plugin: Trace, MyBatis Tracking, Custom Timing Colors, and Scripting
The article introduces the latest Cool Request IDEA plugin update, detailing its Trace capability for method execution timing, selective MyBatis function monitoring, customizable slow‑method highlighting, and scripting support for headers and JSON parsing, all illustrated with Java code examples.
Introduction: The article introduces the latest update of the Cool Request plugin for IntelliJ IDEA, which now supports method execution time statistics and various tracing capabilities.
What is Cool Request: It is an interface debugging plugin that can send HTTP requests, perform reflection calls, bypass interceptors, and invoke methods annotated with @Scheduled or managed by xxl‑job.
Trace feature: The Trace function can track execution of any non‑java package methods, with configurable depth (1‑3). Depth 1 tracks only controller methods, depth 2 includes methods called by the controller, and depth 3 follows deeper calls, with manual addition possible for interface‑based calls.
MyBatis function tracking: Trace can selectively monitor MyBatis execution functions, allowing users to see query durations such as 7 ms.
Call count display and custom timing colors: The UI shows a "+100" indicator for the number of calls under a method, and users can set a threshold (e.g., 5 ms) to highlight methods exceeding that duration in red.
Scripting environment: Scripts can set request headers (e.g., token) and manipulate environment variables, making it easy to handle authentication. Responses are often JSON, which can be parsed using built‑in libraries like ObjectMapper or Gson .
Code example:
public void handlerResponse(ILog log, HTTPResponse response, IEnv env) {
String body = new String(response.getResponseBody());
log.println(body);
User user = JSON.parseObject(body, User.class);
log.println(user.getAge()+"");
}Conclusion: Readers are encouraged to share the article, join the architect community, and explore the new capabilities of Cool Request for more efficient Java development.
Java Architect Essentials
Committed to sharing quality articles and tutorials to help Java programmers progress from junior to mid-level to senior architect. We curate high-quality learning resources, interview questions, videos, and projects from across the internet to help you systematically improve your Java architecture skills. Follow and reply '1024' to get Java programming resources. Learn together, grow together.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.