【转】ThreadLocal 解决SimpleDateFormat非线程安全
protected T initialValue() { return null;//直接返回null }
当然也可以使用:apache commons-lang包的DateFormatUtils或者FastDateFormat实现,apache保证是线程安全的,并且更高效。
?