zhouhaibin
5 months ago
15 changed files with 350 additions and 266 deletions
@ -1,31 +0,0 @@ |
|||
-----BEGIN CERTIFICATE----- |
|||
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 |
|||
-----END CERTIFICATE----- |
@ -0,0 +1,32 @@ |
|||
package tech.abc.platform.elasticsearch.config; |
|||
|
|||
import com.google.gson.*; |
|||
|
|||
import java.lang.reflect.Type; |
|||
import java.time.LocalDateTime; |
|||
import java.time.format.DateTimeFormatter; |
|||
|
|||
/** |
|||
* @author 李昊哲 |
|||
* @version 1.0 |
|||
* @create 2023/10/19 |
|||
*/ |
|||
public class LocalDateTimeAdapter implements JsonDeserializer<LocalDateTime>, JsonSerializer<LocalDateTime> { |
|||
private final DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); |
|||
|
|||
@Override |
|||
public JsonElement serialize(LocalDateTime src, Type typeOfSrc, JsonSerializationContext context) { |
|||
return new JsonPrimitive(dateTimeFormatter.format(src)); |
|||
} |
|||
|
|||
@Override |
|||
public LocalDateTime deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException { |
|||
try { |
|||
|
|||
return LocalDateTime.parse(json.getAsString().substring(0, 10) +" "+ json.getAsString().substring(11, 19), dateTimeFormatter); |
|||
} catch (Exception e) { |
|||
throw new JsonParseException(e); |
|||
} |
|||
} |
|||
|
|||
} |
@ -1,12 +1,12 @@ |
|||
platform-config: |
|||
oss: |
|||
# 本地磁盘存储模式 |
|||
# storeClass: tech.abc.platform.oss.service.impl.LocalStoreServiceImpl |
|||
# 集成minio模式 |
|||
storeClass: tech.abc.platform.oss.service.impl.MinioStoreServiceImpl |
|||
basePath: c:/attachment/ |
|||
minio: |
|||
server: http://127.0.0.1:9000 |
|||
accessKey: admin |
|||
secretKey: 12345678 |
|||
bucketName: abc |
|||
#platform-config: |
|||
# oss: |
|||
## 本地磁盘存储模式 |
|||
## storeClass: tech.abc.platform.oss.service.impl.LocalStoreServiceImpl |
|||
## 集成minio模式 |
|||
# storeClass: tech.abc.platform.oss.service.impl.MinioStoreServiceImpl |
|||
# basePath: c:/attachment/ |
|||
# minio: |
|||
# server: http://127.0.0.1:9000 |
|||
# accessKey: minioadmin |
|||
# secretKey: minioadmin |
|||
# bucketName: test |
|||
|
Loading…
Reference in new issue