1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > Spring中xml文件配置也可以配置容器list set map

Spring中xml文件配置也可以配置容器list set map

时间:2019-11-20 21:06:46

相关推荐

Spring中xml文件配置也可以配置容器list set map

<?xml version="1.0" encoding="UTF-8"?><beans xmlns="/schema/beans"xmlns:xsi="/2001/XMLSchema-instance"xmlns:c="/schema/c"xmlns:context="/schema/context"xmlns:jdbc="/schema/jdbc"xmlns:p="/schema/p"xmlns:mvc="/schema/mvc"xsi:schemaLocation="/schema/jdbc /schema/jdbc/spring-jdbc-4.3.xsd/schema/mvc /schema/mvc/spring-mvc-4.3.xsd/schema/beans /schema/beans/spring-beans.xsd/schema/context /schema/context/spring-context-4.3.xsd"><bean id = "dog" class = "8w.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="8w.Mvc"></context:component-scan><bean id = "car" class = "8w.Mvc.Car"><property name="type" value = "auto"></property><property name="price" value = "1000000"></property></bean><!-- 自动类中引用别的外部类 --><bean id = "persion" class = "8w.Mvc.Persion"><property name="names" value = "lees"></property><property name="age" value = "13"></property><property name="cars" ref = "car"></property></bean></beans>

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

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。