摘要: beans-relation.xml <?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/ 阅读全文
posted @ 2016-08-21 22:52 疯狂的tiger 阅读(754) 评论(0) 推荐(0) 编辑
摘要: Beans-autowire.xml <?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/ 阅读全文
posted @ 2016-08-21 22:36 疯狂的tiger 阅读(392) 评论(0) 推荐(0) 编辑
摘要: XML 配置 <bean id="person3" class="com.hy.spring.beans.collections.Person"> <property name="name" value="HAO"></property> <property name="age" value="30 阅读全文
posted @ 2016-08-21 20:57 疯狂的tiger 阅读(456) 评论(0) 推荐(0) 编辑
摘要: XML 代码: <!-- 使用构造器注入属性值的位置和参数的类型!以区分重载的构造器! --> <bean id="car1" class="com.hy.spring.beans.Car"> <constructor-arg value="BaoMa" type="String"></constr 阅读全文
posted @ 2016-08-21 16:03 疯狂的tiger 阅读(935) 评论(0) 推荐(0) 编辑
摘要: applicationContext.xml <?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2 阅读全文
posted @ 2016-08-21 15:47 疯狂的tiger 阅读(228) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2016-08-21 15:45 疯狂的tiger 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2016-08-21 12:11 疯狂的tiger 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 目录: 各个类文件: pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http:/ 阅读全文
posted @ 2016-08-21 11:52 疯狂的tiger 阅读(204) 评论(0) 推荐(0) 编辑
摘要: 把以下 jar 包加入到工程的 classpath 下: Spring 的配置文件: 一个典型的 Spring 项目需要创建一个或多个 Bean 配置文件, 这些配置文件用于在 Spring IOC 容器里配置 Bean. Bean 的配置文件可以放在 classpath 下, 也可以放在其它目录下 阅读全文
posted @ 2016-08-21 11:20 疯狂的tiger 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2016-08-21 11:18 疯狂的tiger 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2016-08-21 11:17 疯狂的tiger 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2016-08-21 11:16 疯狂的tiger 阅读(138) 评论(0) 推荐(0) 编辑