SimpleDateFormat线程安全问题
private static ThreadLocal<DateFormat> threadLocalSDF = new ThreadLocal<DateFormat>(); public static DateFormat getShortDateFormat() { DateFormat df = threadLocalSDF.get(); if (df == null) { df = new SimpleDateFormat("yyMMdd"); threadLocalSDF.set(df); } return df; }