<?xml version="1.0" encoding="UTF-8"?>
<beans
 xmlns="http://www.springframework.org/schema/beans"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xmlns:context="http://www.springframework.org/schema/context"
 xsi:schemaLocation="http://www.springframework.org/schema/beans
                    http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
                    http://www.springframework.org/schema/context
                    http://www.springframework.org/schema/context/spring-context-4.0.xsd
">
<bean id="hello" class="org.feiruanstudio.springbasic.Bean"></bean>

<!-- 构造函数注入 -->
<!-- 属性函数注入 -->
<bean id="id" class="class">
     <constructor-arg value="const"/>
    <property name="songName" value="value"/>
</bean>

<!-- 静态工厂注入 -->
<bean id="staticsong" class="org.feiruanstudio.springbasic.StaticSong"
     factory-method="getInstence">
</bean>

</beans>

自己的一份Spring的xml配置文件的更多相关文章

  1. JavaWeb_(Spring框架)xml配置文件

    系列博文 JavaWeb_(Spring框架)xml配置文件  传送门 JavaWeb_(Spring框架)注解配置 传送门 Xml配置 a)Bean元素:交由Spring管理的对象都要配置在bean ...

  2. Spring 通过XML配置文件以及通过注解形式来AOP 来实现前置,环绕,异常通知,返回后通知,后通知

    本节主要内容: 一.Spring 通过XML配置文件形式来AOP 来实现前置,环绕,异常通知     1. Spring AOP  前置通知 XML配置使用案例     2. Spring AOP   ...

  3. [error] eclipse编写spring等xml配置文件时只有部分提示,tx无提示

    eclipse编写spring等xml配置文件时只有<bean>.<context>等有提示,其他标签都没有提示 这时就需要做以下两步操作(下面以事务管理标签为例) 1,添加命 ...

  4. Spring框架xml配置文件 复杂类型属性注入——数组 list map properties DI dependency injection 依赖注入——属性值的注入依赖于建立的对象(堆空间)

    Person类中的各种属性写法如下: package com.swift.person; import java.util.Arrays; import java.util.List; import ...

  5. Spring根据XML配置文件注入对象类型属性

    这里有dao.service和Servlet三个地方 通过配过文件xml生成对象,并注入对象类型的属性,降低耦合 dao文件代码: package com.swift; public class Da ...

  6. 如何配置多个Spring的xml配置文件(多模块配置)

    如何使用多个Spring的xml配置文件(多模块配置) (2009-08-22 13:42:43)   如何使用多个Spring的xml配置文件(多模块配置) 在用Struts Spring Hibe ...

  7. Spring读取xml配置文件的原理与实现

    本篇博文的目录: 一:前言 二:spring的配置文件 三:依赖的第三方库.使用技术.代码布局 四:Document实现 五:获取Element的实现 六:解析Element元素 七:Bean创造器 ...

  8. Spring的xml配置文件中约束的必要性 找不到元素 'beans' 的声明

    今天在复习Spring MVC框架的时候,只知道xml配置文件中的约束有规范书写格式的作用,所以在配置HandlerMapping对象信息的时候没有加入约束信息之后进行测试,没有遇到问题.后来在配置S ...

  9. Spring 在 xml配置文件 或 annotation 注解中 运用Spring EL表达式

    Spring  EL 一:在Spring xml 配置文件中运用   Spring EL Spring EL 采用 #{Sp Expression  Language} 即 #{spring表达式} ...

随机推荐

  1. VS2010中如何查看DLL的导出接口

    看<VC++动态链接库(DLL)编程深入浅出>时,里面提到使用Visual C++的Depends工具可以查看动态链接库中的导出接口.对于VC6.0,VC所带的Depends软件,在VC6 ...

  2. easyui-datagrid 两次请求

    原因分析及解决方案 html代码中利用class声明了datagrid,导致easyUI解析class代码的时候先解析class声明中的datagrid,这样组件就请求了一次url:然后又调用js初始 ...

  3. soem函数库的编译

    D:/并条机/soem/soem-master/doc/html/files.htm https://github.com/smits/soem https://github.com/OpenEthe ...

  4. LLVM,Clang

    在使用xcode时常常会遇到这2个概念,今天总结一下. wiki中关于llvm的描述: LLVM提供了完整編譯系統的中間層,它會將中間語言(IF, Intermediate form)從編譯器取出與最 ...

  5. Java for LeetCode 169 Majority Element

    Given an array of size n, find the majority element. The majority element is the element that appear ...

  6. 5.django笔记之form保存表单信息,动态select

    作者:刘耀 一.使用form保存用户输入过的信息 场景:例如 如果用户注册,那么他输入n多个表单之后,那么他提交是时候,如果错误返回的时候,那么需要重新再输入表单内容.这样会影响用户体验,所以,使用f ...

  7. extjs插件开发上传下载文件简单案例

    前台,extjs,框架,mybatis,spring,springMVC,简单的文件上传下载案例. 必要的jar包,commons-fileupload-1.3.1.jar,commons-io-2. ...

  8. JavaScript、Jquery选择题

    尚学堂Java EE软件工程师认证考试 试题库-选择题     一.    选择题(包括单选和双选) 1.B 在JavaScript中,以下变量命名非法的是(   )(选择一项) A. numb_1 ...

  9. FragmentTabHost+ViewPager实现底部按钮

    package com.example.fragmenttabdemo; import java.util.ArrayList; import java.util.List; import andro ...

  10. 关于printf函数输出先后顺序的讲解!!

    对于printf函数printf("%d%d\n",a,b);函数的实际输出顺序是这样的先计算出b,然后在计算a,接着输出a,最后在输出b:例子如下:#include<ios ...