public class MyBean1{
private MyBean2 bean2;
public MyBean1(MyBean2 bean2){
this.bean2=bean2;
}
}
xml格式:
<!-- Definition for bean1 -->
<bean id = "bean1" class = "com.MyBean1">
<constructor-arg ref = "bean2"/>
</bean>
<!-- Definition for bean2 -->
<bean id = "bean2" class = "com.MyBean2"></bean>
1条答案
按热度按时间t5zmwmid1#
mybean1.等级:
xml格式: