本文整理汇总了Java中com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder类的典型用法代码示例。如果您正苦于以下问题:Java StdTypeResolverBuilder类的具体用法?Java StdTypeResolverBuilder怎么用?Java StdTypeResolverBuilder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
StdTypeResolverBuilder类属于com.fasterxml.jackson.databind.jsontype.impl包,在下文中一共展示了StdTypeResolverBuilder类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: AppConfigService
import com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder; //导入依赖的package包/类
@Autowired
public AppConfigService(KvMapperFactory kvMapperFactory, ObjectMapper objectMapper) {
// we must use custom configuration of mapper, but need use most options and modules from global mapper
this.objectMapper = objectMapper.copy();
StdTypeResolverBuilder trb = new ObjectMapper.DefaultTypeResolverBuilder(ObjectMapper.DefaultTyping.JAVA_LANG_OBJECT);
trb.init(JsonTypeInfo.Id.CLASS, new CustomTypeIdResolver()).inclusion(JsonTypeInfo.As.PROPERTY);
this.objectMapper.setDefaultTyping(trb);
this.objectMapper.registerModule(new KvSupportModule(kvMapperFactory));
}
示例2: _constructNoTypeResolverBuilder
import com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder; //导入依赖的package包/类
protected StdTypeResolverBuilder _constructNoTypeResolverBuilder()
{
return StdTypeResolverBuilder.noTypeInfoBuilder();
}
示例3: _constructStdTypeResolverBuilder
import com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder; //导入依赖的package包/类
protected StdTypeResolverBuilder _constructStdTypeResolverBuilder()
{
return new StdTypeResolverBuilder();
}
示例4: _constructStdTypeResolverBuilder
import com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder; //导入依赖的package包/类
/**
* Helper method for constructing standard {@link TypeResolverBuilder}
* implementation.
*/
protected StdTypeResolverBuilder _constructStdTypeResolverBuilder() {
return new StdTypeResolverBuilder();
}
示例5: _constructNoTypeResolverBuilder
import com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder; //导入依赖的package包/类
/**
* Helper method for dealing with "no type info" marker; can't be null
* (as it'd be replaced by default typing)
*/
protected StdTypeResolverBuilder _constructNoTypeResolverBuilder() {
return StdTypeResolverBuilder.noTypeInfoBuilder();
}