JVM performance tuning monitoring tool hprof use detailed

Ⅰ Problem In real-world enterprise Java development, sometimes we encounter the following problems: OutOfMemoryError Memory leak Thread deadlock Lock Contention Java process consumes too much CPU …… These problems may be overlooked by many people in daily development (for example, some people encounter the above problems just restart the server or increase the memory, but […]

Ali Open Source Java Diagnostic Tool-Arthas

Arthas is an open source tool for Java developed by Alibaba recently. It mainly for diagnosing the problems of java. I. Overview This tool can help you do the following things: Which jar package loaded this class from? Why do you code throws various kinds of Exceptions? If you encounter problems on product environment , […]

Use regular to replace the src of the img tag

Requirement: Due to system switching, it is required to patch the src attribute of the img tag in the webpage content in the database. For example: After the replacement is required: Use regular to solve, the code is as follows (ApiUtil.java static method) Java code collection code  Test code: Java code collection code The key […]