package com.example.spring.model;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class Employee {
private int id;
@Autowired
private Name_XML_Bean name;
@Autowired
private Address_Configure_Bean address;
@Autowired
private Sex_Annotation_Bean sex;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public void setName(String name) {
this.name.setName(name);
}
public void setAddress(String address) {
this.address.setAddress(address);
}
public void setSex(String sex) {
this.sex.setSex(sex);
}
@Override
public String toString() {
return "Employee [id=" + id +
", name=" + name.getName() +
", address=" + address.getAddress() +
", sex=" + sex.getSex() +
"]";
}
}