Hibernate Mysql注解设置自动增长列

@Entity
@Table(name = "T_POWER")
public class Power extends BaseEntity<Power, Long> {

// 权限ID
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@GenericGenerator(name = "persistenceGenerator", strategy = "increment")
@Column(name = "SYS_ID")
private long mlPowerId;

你可能感兴趣的:(mysql,Hibernate)