下面还有静态代理和动态代理1.构造注入 lib包:在entity包下新建一个实体类User代码: 1 package cn.happy.entity; 2 3 public class User { 4 private Integer id; 5 private S ...
下面还有静态代理和动态代理
1.构造注入
lib包:
在entity包下新建一个实体类User
代码:
1 package cn.happy.entity; 2 3 public class User { 4 private Integer id; 5 private String name; 6 private String age; 7 private String eamil; 8 9 public User(Integer id, String name, String age, String eamil) {10 this.id = id;11 this.name = name;12 this.age = age;13 this.eamil = eamil;14 }15 public User(String name, String age, String eamil) {16 super();17 this.name = name;18 this.age = age;19 this.eamil = eamil;20 }21 public User() {22 }23 public User(String name, String age) {24 this.name = name;25 this.age = age;26 }27 28 public Integer getId() {29 return id;30 }31 public void setId(Integer id) {32 this.id = id;33 }34 public String getName() {35 return name;36 }37 public void setName(String name) {38 this.name = name;39 }40 public String getAge() {41 return age;42 }43 public void setAge(String age) {44 this.age = age;45 }46 public String getEamil() {47 return eamil;48 }49 public void setEamil(String eamil) {50 this.eamil = eamil;51 }52 @Override53 public String toString() {54 return "User [id=" + id + ", name=" + name + ", age=" + age55 + ", eamil=" + eamil + "]";56 }57 58 }
原标题:IOC和Aop使用的扩展
关键词:aop
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:
admin#shaoqun.com
(#换成@)。