spring基础配文件
来源:互联网 发布:php抽奖系统 编辑:程序博客网 时间:2024/06/06 11:01
<?xmlversion="1.0"encoding="UTF-8"?>
<beansxmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd">
<!-- <bean id="add" class="com.lanou.spring.AddCaculator"> </bean> -->
<!--scope="prototype" 不是单例,多例 ,懒加载优先级高于scope -->
<!-- init-method="toString" 对象创建时就执行 -->
<beanid="user"class="com.lanou.spring.beans.User" scope="prototype" lazy-init="true" init-method="toString" destroy-method="destory">
<propertyname="username"value="liguocheng"></property>
<propertyname="pwd">
<value>123456</value>
</property>
<!-- value只能放四类八种和String,ref注入对象 -->
<propertyname="id"value="123"></property>
<propertyname="name">
<list>
<value>wangyu</value>
<value>xuchao</value>
<value>lilei</value>
</list>
</property>
<!-- map -->
<propertyname="map">
<map>
<entry>
<key>
<value>xuchao123</value>
</key>
<value>gegege</value>
</entry>
</map>
</property>
<!-- ********************* set *********************** -->
<propertyname="set">
<set>
<value>110</value>
<value>111</value>
<value>112</value>
</set>
</property>
<propertyname="array" >
<array>
<value>fuxionglong</value>
<value>luziqiang</value>
<value>guolei</value>
</array>
</property>
<propertyname="userinfo"ref="userinfo"></property>
</bean>
<beanid="userinfo"class="com.lanou.spring.beans.UserInfo">
<propertyname="phone"value="17794213370"></property>
<propertyname="email"value="2301168624@qq.com"></property>
<propertyname="id"value="11222"></property>
</bean>
<!-- 构造方法注入 -->
<beanid="tom" class="com.lanou.spring.beans.Cat" lazy-init="true">
<constructor-arg>
<!-- 参数 -->
<value>black</value>
</constructor-arg>
<constructor-arg>
<refbean="user"/>
</constructor-arg>
</bean>
</beans>
- spring基础配文件
- Spring基础:使用外部属性文件
- Spring Boot基础|文件上传配置|Spring Boot如何上传文件
- Spring Boot基础|使用nohup运行jar文件
- Spring Boot 基于Maven 基础Pom.xml文件
- spring mvc基础之文件上传(基于html5)
- 附录: Spring Boot 推荐的基础 POM 文件
- spring-基础
- Spring基础
- Spring 基础
- Spring 基础
- spring 基础
- Spring基础
- spring基础
- Spring基础
- spring基础
- spring基础
- Spring基础
- bigdecimal类型除法问题
- leetcode---add-two-numbers---链表
- PAT
- Spring Boot构建interceptor简明教程
- Ctrlbox Project v2.3项目管理用户手册(四)——操作详解4.2
- spring基础配文件
- 问题 G: 数字分类 (20)
- 多次求1*2*3*...*n的值
- codeforces 869B The Eternal Immortality
- 理解OAuth 2.0
- 活动图与流程图的主要区别
- 《汇编语言》(第三版)王爽第九章实验9个人方法记录
- 前端html+css+js弹窗的实现
- L1-026. I Love GPLT