我创建了一个简单的实体,但它给我错误,因为不是托管类型:.entity.Skus
实体类
package <path>.entity;
import jakarta.persistence.Column;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.Entity;
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Entity(name = "skus")
public class Skus extends BaseEntity{
@Column(name = "name")
private String name;
}
1条答案
按热度按时间34gzjxbg1#
这是由于进口错误
它需要被替换为
import jakarta.persistence.Entity