还在使用SimpleDateFormat?你的项目崩没?

如果是在多线程环境下,就需要注意了。

要点:

1、加Synchronized同步;

2、使用ThreadLocal;

3、jdk8使用DateTimeFormatter替代SimpleDateFormat;

详情见:

http://blog.itpub.net/69900354/viewspace-2629912/

原文地址:https://www.cnblogs.com/starcrm/p/10681534.html