摘要:
当指定constructor-arg属性时,容器实例化bean将使用与其相匹配的构造器进行实例化bean。当类中出现多个构造方法时,如:public class Student { private String firstName; private String lastName; private int age; public Student(String firstName,String lastName){ this.firstName=firstName; this.lastName=lastName; } ... 阅读全文
posted @ 2013-03-26 22:13 曙光城邦 阅读(389) 评论(0) 推荐(0) 编辑