Use a SimpleAbstractTypeResolver:
ObjectMapper mapper = new ObjectMapper();
SimpleModule module = new SimpleModule("CustomModel", Version.unknownVersion());
SimpleAbstractTypeResolver resolver = new SimpleAbstractTypeResolver();
resolver.addMapping(Interface.class, Implementation.class);
module.setAbstractTypes(resolver);
mapper.registerModule(module);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…