<>1. Object's date type add to JsonFormat annotation
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date
<>2. use jackson take object To json
// definition jackson object private static final ObjectMapper MAPPER = new ObjectMapper();
BulkRequestBuilder bulkRequest= client.prepareBulk(); for (Data data : list) {
// Here you can get the batch results of the data needed for business processing IndexRequest index = client .prepareIndex(this.
index, this.type, data.getPrimaryKey() + "") .setSource(MAPPER.
writeValueAsString(data)) .request(); bulkRequest.add(index); } BulkResponse
bulkResponse= bulkRequest.setRefreshPolicy(WriteRequest.RefreshPolicy.NONE).