代码提交
This commit is contained in:
parent
c5f5f1df97
commit
63f806302f
|
@ -1,5 +1,6 @@
|
|||
package com.changhu.support.fastjson2.serializer;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.extra.spring.SpringUtil;
|
||||
import com.alibaba.fastjson2.JSONWriter;
|
||||
import com.alibaba.fastjson2.writer.ObjectWriter;
|
||||
|
@ -22,6 +23,8 @@ public class MinioPrefixSerializer implements ObjectWriter<String> {
|
|||
|
||||
@Override
|
||||
public void write(JSONWriter jsonWriter, Object object, Object fieldName, Type fieldType, long features) {
|
||||
if (object instanceof String path && StrUtil.isNotEmpty(path)) {
|
||||
jsonWriter.writeString(minioPrefix + object);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue