SerializeConfig这个可以不用static修饰吗
private static SerializeConfig mapping = new SerializeConfig();
    static {//怎么把这一行的static去掉
        mapping.put(Date.class, threadLocal.get());
    } Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
这看着像阿里的fastjson吧,
mapping是个静态属性
static块是为了初始化追加一个对象进去
至于可以不用static修饰当然是可以的
你只要在使用mapping这个属性前吧内容追加进去就行了