【发布时间】:2017-02-09 23:22:51
【问题描述】:
在我的 spring mvc 应用程序中,我有以下对象。我正在尝试在我的应用程序中使用 devtool 来可视化数据。
@Entity
@Data
public class ConsultationRequest {
@Id
@GeneratedValue
private Long id;
private String name;
private String email;
private String purpose;
private String programme;
private int year;
private String language;
private String comments;
@Enumerated(EnumType.STRING)
private ConsultationStatus status;
}
然后我用jpa制作实体:
@Repository
public interface ConsultationRequestRepository extends JpaRepository<ConsultationRequest, Long> {
}
问题是当我加载我的应用程序时,我遇到了 2 个错误:
Unsuccessful: drop sequence hibernate_sequence
[36morg.hibernate.tool.hbm2ddl.SchemaExport Sequence "HIBERNATE_SEQUENCE" not found; SQL statement:
然后当我打开
http://localhost:8080/h2-console/
我看不到桌子。 似乎在引导过程中,表没有制作。
【问题讨论】:
标签: spring hibernate jpa hbm2ddl