|
@@ -15,13 +15,7 @@ import java.util.regex.Matcher;
|
|
|
public class FileUtils {
|
|
|
|
|
|
public static void writeUtf8String(final Object content, final String filePath) {
|
|
|
- String data = JSON.toJSONStringWithDateFormat(
|
|
|
- content,
|
|
|
- "yyyy-MM-dd HH:mm:ss",
|
|
|
- SerializerFeature.WriteNullListAsEmpty, // 将 null 的 List 输出为 []
|
|
|
- SerializerFeature.WriteNullStringAsEmpty // 将 null 的 String 输出为 ""
|
|
|
- ); //清空所有域名
|
|
|
- data = getStringReplaceUrl(data);
|
|
|
+ String data = getStringReplaceUrl(String.valueOf(content));
|
|
|
FileUtil.writeUtf8String(data, filePath.replaceAll("/", Matcher.quoteReplacement(File.separator)));
|
|
|
}
|
|
|
|