mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-05-15 04:22:09 +08:00
修正无法自动取到timezone的问题
This commit is contained in:
@@ -11,9 +11,12 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.TimeZone;
|
||||
|
||||
/**
|
||||
* JSON 工具类
|
||||
@@ -24,11 +27,15 @@ public class JsonUtil {
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(JsonUtil.class);
|
||||
|
||||
private static ObjectMapper objectMapper = new ObjectMapper();
|
||||
private static final ObjectMapper objectMapper = new ObjectMapper();
|
||||
|
||||
private JsonUtil() {
|
||||
}
|
||||
|
||||
static {
|
||||
objectMapper.setTimeZone(TimeZone.getDefault());
|
||||
}
|
||||
|
||||
public static String toJsonString(Object object) {
|
||||
if (ObjectUtil.isNull(object)) {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user