<?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:c="http://www.springframework.org/schema/c"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-4.3.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd"> <bean id = "dog" class = "com.cc8w.Entity.Dog">
<constructor-arg>
<value>旺财</value>
</constructor-arg>
<constructor-arg>
<value>20</value>
</constructor-arg>
<constructor-arg>
<value>雄性</value>
</constructor-arg>
</bean>
<!-- 自动寻找类 -->
<context:component-scan base-package="com.cc8w.Mvc"></context:component-scan> <bean id = "car" class = "com.cc8w.Mvc.Car">
<property name="type" value = "auto"></property>
<property name="price" value = "1000000"></property>
</bean>
<!-- 自动类中引用别的外部类 -->
<bean id = "persion" class = "com.cc8w.Mvc.Persion">
<property name="names" value = "lees"></property>
<property name="age" value = "13"></property>
<property name="cars" ref = "car"></property> </bean> </beans>

特殊字符用<![CDATA[]]>包含

Spring中xml文件配置也可以配置容器list、set、map的更多相关文章

  1. MyEclipse/Eclipse中XML文件的格式化配置

    Eclipse中XML文件的格式化配置 MyEclipse: 这一步的配置是使格式化的效果为控件的每个属性配置占一行.进入 Window/Preferences,展开到 XML/XML Resourc ...

  2. Java Web的web.xml文件作用及基本配置(转)

    其实web.xml就是asp.net的web.config一个道理. 说明: 一个web中完全可以没有web.xml文件,也就是说,web.xml文件并不是web工程必须的. web.xml文件是用来 ...

  3. 【转载】Java Web的web.xml文件作用及基本配置

    其实web.xml就是asp.net的web.config一个道理. 说明: 一个web中完全可以没有web.xml文件,也就是说,web.xml文件并不是web工程必须的. web.xml文件是用来 ...

  4. 51. spring boot属性文件之多环境配置【从零开始学Spring Boot】

    原本这个章节是要介绍<log4j多环境不同日志级别的控制的>但是没有这篇文章做基础的话,学习起来还是有点难度的,所以我们先一起了解下spring boot属性文件之多环境配置,当然文章中也 ...

  5. 曹工说Spring Boot源码(17)-- Spring从xml文件里到底得到了什么(aop:config完整解析【中】)

    写在前面的话 相关背景及资源: 曹工说Spring Boot源码(1)-- Bean Definition到底是什么,附spring思维导图分享 曹工说Spring Boot源码(2)-- Bean ...

  6. ideal中spring的xml文件没有提示的问题

    ideal中spring的xml文件没有提示的问题 今天第一次用ideal来练习spring,发现和视频中老师不一样,我的没有提示.老师的视频里,他写了个<mvc:a   就会有一系列的提示,然 ...

  7. Spring AOP:面向切面编程,AspectJ,是基于spring 的xml文件的方法

    导包等不在赘述: 建立一个接口:ArithmeticCalculator,没有实例化的方法: package com.atguigu.spring.aop.impl.panpan; public in ...

  8. 曹工说Spring Boot源码(7)-- Spring解析xml文件,到底从中得到了什么(上)

    写在前面的话 相关背景及资源: 曹工说Spring Boot源码(1)-- Bean Definition到底是什么,附spring思维导图分享 曹工说Spring Boot源码(2)-- Bean ...

  9. 曹工说Spring Boot源码(8)-- Spring解析xml文件,到底从中得到了什么(util命名空间)

    写在前面的话 相关背景及资源: 曹工说Spring Boot源码(1)-- Bean Definition到底是什么,附spring思维导图分享 曹工说Spring Boot源码(2)-- Bean ...

随机推荐

  1. 关于NLPIR应用在KETTLE中的探索

    一:什么是NLPIR? NLPIR汉语分词系统(自然语言处理与信息检索共享平台),主要功能包括中文分词:词性标注:命名实体识别:用户词典功能:支持GBK编码.UTF8编码.BIG5编码.新增微博分词. ...

  2. Unity3d---> IEnumerator

    Unity3d---> IEnumerator 2013-04-18 10:24 2162人阅读 评论(0) 收藏 举报 Unity3dc# using UnityEngine; using S ...

  3. iptables日志与limit参数

    在处理工作问题的时候需要查看防火墙的日志,由于默认日志都是在系统日志里/var/log/messages里面.需要对rsyslog做设置. 首先编辑配置文件/etc/rsyslog.conf如下: # ...

  4. 算法(第四版)学习笔记之java实现希尔排序

    希尔排序思想:使数组中随意间隔为h的元素都是有序的. 希尔排序是插入排序的优化.先对数组局部进行排序,最后再使用插入排序将部分有序的数组排序. 代码例如以下: /** * * @author seab ...

  5. 记dynamic的一个小坑 -- RuntimeBinderException:“object”未包括“xxx”的定义

    创建一个控制台程序和一个类库, 在控制台创建一个匿名对象.然后再在类库中訪问它.代码例如以下: namespace ConsoleApplication1 { class Program { stat ...

  6. VS2015不能修改安装路径问题

    Python作为一门强大.开源的脚本语言也被ArcGIS所使用,但其开发编程环境(IDE)实现是太不方便了,VS2015终于集成了python开发,所以,也想对python多作一些了解和使用. 但今天 ...

  7. Linux内核中网络数据包的接收-第一部分 概念和框架

    与网络数据包的发送不同,网络收包是异步的的.由于你不确定谁会在什么时候突然发一个网络包给你.因此这个网络收包逻辑事实上包括两件事:1.数据包到来后的通知2.收到通知并从数据包中获取数据这两件事发生在协 ...

  8. KnockoutJS + My97DatePicker

    如何将Knockoutjs和其他脚本库结合使用?这里给出一个Knockoutjs与my97datepicker配合使用的例子,例子中使用了ko的自定义绑定功能: ko.bindingHandlers. ...

  9. windows执行命令来运行loadrunner录制好的脚本(收藏)

    SET M_ROOT=D:Mercury InteractiveMercury LoadRunnerincd %M_ROOT% wlrun.exe -TestPath D:ceshi10Scenari ...

  10. Fiddler 中请求时间的显示列

    在Tool bar上面找到 Rules->CustomRules 在class Handlers{   里面添加 //----------------------------显示请求时间,显示毫 ...