摘要: <bean id="video" class="com.example.demo01.domain.Video"> <constructor-arg name="title" value="spirng title"/> <constructor-arg name="id" value="8"/>< 阅读全文
posted @ 2021-11-23 23:48 智慧搬运工 阅读(251) 评论(0) 推荐(0)
摘要: 常见的属性有两种: singleton:单例,默认值,调用getBean方法返回同一个对象。 prototype:多例,调用getBean方法返回不同的对象。 阅读全文
posted @ 2021-11-23 23:22 智慧搬运工 阅读(28) 评论(0) 推荐(0)
摘要: 在配置文件applicationContext.xml中: bean 中使用ref如下代码 <bean id="video" class="com.example.demo01.domain.Video"> <property name="id" value="25"/> <property nam 阅读全文
posted @ 2021-11-23 23:11 智慧搬运工 阅读(56) 评论(0) 推荐(0)