Spring不同类型的注入方式
来源:互联网 发布:王菲演唱会网络直播 编辑:程序博客网 时间:2024/05/18 17:59
<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"><!--==============================================================--> <!--<bean id="hello" class="com.test.Hello">--> <!--<property name="msg" value="我是SET注入"></property>--> <!--<property name="date" ref="date"></property>--> <!--</bean>--> <!--<bean id="date" class="java.util.Date"></bean>--><!--===========================================================--> <bean id="hello" class="com.test.Hello"> <constructor-arg index="0" value="我是构造注入"></constructor-arg> <constructor-arg index="1" ref="date"></constructor-arg> </bean> <bean id="date" class="java.util.Date"></bean> <bean id="person" class="com.test.Person"> <property name="boys"> <list> <value>杨过</value> <value>小龙女</value> <value>小明</value> </list> </property> <property name="girls"> <set> <value>小花1</value> <value>小花2</value> <value>小花3</value> </set> </property> <property name="guanxi"> <map> <entry key="杨过1"> <value>1</value> </entry> <entry key="杨过2"> <value>2</value> </entry> <entry key="杨过3"> <value>3</value> </entry> </map> </property> <property name="objects"> <list> <value>date</value> <ref bean="date"></ref> <value>hello</value> <ref bean="hello"></ref> </list> </property> <property name="properties"> <props> <prop key="1">我是1</prop> <prop key="2">我是2</prop> </props> </property> <property name="boys2"> <list> <ref bean="hello"></ref> <ref bean="hello"></ref> </list> </property> </bean></beans>
0 0
- Spring不同类型的注入方式
- Spring框架中对bean类不同类型属性的注入方式
- 不同类型参数的注入
- 有哪些不同类型的IOC(依赖注入)方式?
- Spring的注入方式
- Spring的注入方式
- Spring的注入方式
- Spring的注入方式
- Spring的注入方式
- Spring的注入方式
- Spring的注入方式
- Spring注入的方式
- Spring的注入方式
- Spring的注入方式
- Spring的注入方式详解
- Spring的注入方式详解
- Spring依赖注入的方式
- spring-依赖注入的方式
- 可重入函数与不可重入函数
- 这是一个分割线ionic和react的分界线
- JS Window.Open 打开窗口详解
- 从零开始学_JavaScript_系列(29)——apply和call
- scrollview smoothScrollTo不起作用的问题
- Spring不同类型的注入方式
- Java的GC与finalize函数
- PHP+Mysql+jQuery找回密码
- Leetcode题解 396. Rotate Function
- 赛马网基本算法之--马路上的路灯
- 多线程编程基础知识
- js jquery搜索下拉框 自动选中 搜索到结尾处从头搜索
- android developer tiny share-20160923
- IIC