如標題
package tw.chen.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import org.springframework.stereotype.Component;
@Entity@Table(name = "Show")
@Component
public class Show {
@Id@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private int id;
private String title;
private String name;
private String sdate;
private String edate;
private String price;
private String picture;
public Show(int id, String title, String name, String sdate, String edate, String price, String picture) {
this.id = id;
this.title = title;
this.name = name;
this.sdate = sdate;
this.edate = edate;
this.price = price;
this.picture = picture;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getSdate() {
return sdate;
}
public void setSdate(String sdate) {
this.sdate = sdate;
}
public String getEdate() {
return edate;
}
public void setEdate(String edate) {
this.edate = edate;
}
public String getPrice() {
return price;
}
public void setPrice(String price) {
this.price = price;
}
public String getPicture() {
return picture;
}
public void setPicture(String picture) {
this.picture = picture;
}
}
這樣建構Bean會直接報錯原因是甚麼?
請各位大神幫忙解答