我认为您不需要任何文档,Java文档可以自我解释。如果我理解正确,则需要一种方法来为字段设置默认值。如果是,请参见以下代码段。
@Entity@Table(name = "my_entity")public class SomeEntity extends baseEntity {public static final class MyValueGenerator implements ValueGenerator<String> { @Override public String generatevalue(Session session, Object owner) { return "This is my default name"; }}@Basic@Column(name = "name", insertable = true, updatable = true, nullable = false, length = 255)// This will add a DDL default@ColumnDefault("'This is my default name'")// This will add a runtime default.@GeneratorType(type = MyValueGenerator.class)private String name;// getters and setters}


