com.github.herowzz.springfuse.data.domain.BaseUidEntity Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of springfuse Show documentation
Show all versions of springfuse Show documentation
Provide basic framework and class library based on Spring Boot Framework.
package com.github.herowzz.springfuse.data.domain;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import org.hibernate.annotations.GenericGenerator;
import com.github.herowzz.springfuse.data.domain.annotation.Comment;
/**
* 实体类基类,主键为UUID生成方式
* @author wangzz
*/
@MappedSuperclass
public abstract class BaseUidEntity extends BaseEntity {
private static final long serialVersionUID = 1L;
@Id
@GenericGenerator(name = "uuid", strategy = "org.hibernate.id.UUIDGenerator")
@GeneratedValue(generator = "uuid")
@Comment("主键,UUID")
protected String id;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy