It would be good if someone can post sample codes too! Thanks in advance!
i have tried this code for a bean class,
@Entity
@Table(name = "language")
@JsonIdentityInfo(generator = ObjectIdGenerators.IntSequenceGenerator.class, property = "@id")
public class Language {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "la_id")
private int id;
@Column(name = "la_name")
private String name;
public Language() {
super();
// TODO Auto-generated constructor stub
}
public Language(int id, String name) {
super();
this.id = id;
this.name = name;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public String toString() {
return "Language [id=" + id + ", name=" + name + "]";
}
}
使用这个弹簧配置器:启动弹簧
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.