我正在尝试使用 MySQL 数据库启动 spring boot 项目,但是数据库有一些问题。我尝试启动我的应用程序,并且服务器正在运行但休眠不创建表等。
这是我的代码:
用户实体
@Entity
public class User {
@Id
@GeneratedValue(strategy = IDENTITY)
private Long id;
private String firstName;
private String lastName;
private String email;
private String password;
private String description;
private String profile_photo;
private LocalDate create;
private LocalDate update;
@OneToMany(mappedBy = "eventOwner")
private List<Event> ownedEvents;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getProfile_photo() {
return profile_photo;
}
public void setProfile_photo(String profile_photo) {
this.profile_photo = profile_photo;
}
public LocalDate getCreate() {
return create;
}
public void setCreate(LocalDate create) {
this.create = create;
}
public LocalDate getUpdate() {
return update;
}
public void setUpdate(LocalDate update) {
this.update = update;
}
public List<Event> getOwnedEvents() {
return ownedEvents;
}
public void setOwnedEvents(List<Event> ownedEvents) {
this.ownedEvents = ownedEvents;
}}
斯蒂芬大帝
天涯尽头无女友
紫衣仙女
相关分类