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