/**
* 获取当前进程ID
*/
private static Integer getCurrentThreadID()
{
RuntimeMXBean runtime = ManagementFactory.getRuntimeMXBean();
String name = runtime.getName();
return Integer.parseInt(name.substring(0, name.indexOf("@")));
}
* 获取当前进程ID
*/
private static Integer getCurrentThreadID()
{
RuntimeMXBean runtime = ManagementFactory.getRuntimeMXBean();
String name = runtime.getName();
return Integer.parseInt(name.substring(0, name.indexOf("@")));
}