自定义JPA之AttributeConverter

1. 执行类

public class BooleanConverter implements AttributeConverter<Boolean, Integer> {

}

2. 属性注解

@Column(name = "VALID")@Convert(converter = BooleanConverter.class)

原文地址:https://www.cnblogs.com/feika/p/4546369.html