聚合多态性
Aggregate Polymorphism
public abstract class Card {}
public class GiftCard extends Card {}
public class ClosedLoopGiftCard extends GiftCard {}
public class OpenLoopGiftCard extends GiftCard {}
public class RechargeableGiftCard extends ClosedLoopGiftCard {}Registering aggregate subtypes
AggregateConfigurer<GiftCard> configurer = AggregateConfigurer.defaultConfiguration(GiftCard.class)
.withSubtype(OpenLoopGiftCard.class)
.withSubtype(RechargeableGiftCard.class);最后更新于