alibaba / fastjson

FASTJSON 2.0.x has been released, faster and more secure, recommend you upgrade.
https://github.com/alibaba/fastjson2/wiki/fastjson_1_upgrade_cn
Apache License 2.0
25.75k stars 6.5k forks source link

new ParserConfig()时无法调用指定的构造函数 #1381

Open ssqiming opened 7 years ago

ssqiming commented 7 years ago

tomcat运行项目时创建ParserConfig对象无法调用指定的构造函数,每次都是调用

public ParserConfig(ClassLoader parentClassLoader) {
    this((ASMDeserializerFactory)null, parentClassLoader, false);
}

导致给propertyNamingStrategy赋值时报错

ParserConfig parserConfig = new ParserConfig();
parserConfig.propertyNamingStrategy = PropertyNamingStrategy.SnakeCase;

但是单元测试的时候创建对象能正常调用指定的构造函数,一切正常,tomcat运行项目就不行了。

wenshao commented 7 years ago

不懂什么意思哦