`
jinnianshilongnian
  • 浏览: 21433907 次
  • 性别: Icon_minigender_1
博客专栏
5c8dac6a-21dc-3466-8abb-057664ab39c7
跟我学spring3
浏览量:2404932
D659df3e-4ad7-3b12-8b9a-1e94abd75ac3
Spring杂谈
浏览量:2997590
43989fe4-8b6b-3109-aaec-379d27dd4090
跟开涛学SpringMVC...
浏览量:5631404
1df97887-a9e1-3328-b6da-091f51f886a1
Servlet3.1规范翻...
浏览量:257542
4f347843-a078-36c1-977f-797c7fc123fc
springmvc杂谈
浏览量:1593136
22722232-95c1-34f2-b8e1-d059493d3d98
hibernate杂谈
浏览量:248958
45b32b6f-7468-3077-be40-00a5853c9a48
跟我学Shiro
浏览量:5847466
Group-logo
跟我学Nginx+Lua开...
浏览量:698110
5041f67a-12b2-30ba-814d-b55f466529d5
亿级流量网站架构核心技术
浏览量:780420
社区版块
存档分类
最新评论

【第二章】 IoC 之 2.2 IoC 容器基本原理 ——跟我学Spring3

阅读更多

2.2.1  IoC容器的概念

IoC容器就是具有依赖注入功能的容器,IoC容器负责实例化、定位、配置应用程序中的对象及建立这些对象间的依赖。应用程序无需直接在代码中new相关的对象,应用程序由IoC容器进行组装。在Spring中BeanFactory是IoC容器的实际代表者。

Spring IoC容器如何知道哪些是它管理的对象呢?这就需要配置文件,Spring IoC容器通过读取配置文件中的配置元数据,通过元数据对应用中的各个对象进行实例化及装配。一般使用基于xml配置文件进行配置元数据,而且Spring与配置文件完全解耦的,可以使用其他任何可能的方式进行配置元数据,比如注解、基于java文件的、基于属性文件的配置都可以。

那Spring IoC容器管理的对象叫什么呢?

2.2.2  Bean的概念

由IoC容器管理的那些组成你应用程序的对象我们就叫它Bean, Bean就是由Spring容器初始化、装配及管理的对象,除此之外,bean就与应用程序中的其他对象没有什么区别了。那IoC怎样确定如何实例化Bean、管理Bean之间的依赖关系以及管理Bean呢?这就需要配置元数据,在Spring中由BeanDefinition代表,后边会详细介绍,配置元数据指定如何实例化Bean、如何组装Bean等。概念知道的差不多了,让我们来做个简单的例子。

2.2.3  Hello World

一、配置环境:

l       JDK安装:安装最新的JDK,至少需要Java 1.5及以上环境;

l       开发工具:SpringSource Tool Suite,简称STS,是个基于Eclipse的开发环境,用以构建Spring应用,其最新版开始支持Spring 3.0及OSGi开发工具,但由于其太庞大,很多功能不是我们所必需的所以我们选择Eclipse+ SpringSource Tool插件进行Spring应用开发;到eclipse官网下载最新的Eclipse,注意我们使用的是Eclipse IDE for Java EE Developers(eclipse-jee-helios-SR1);

安装插件:启动Eclipse,选择Help->Install New Software,如图2-3所示

 

 

图2-3 安装

2、首先安装SpringSource Tool Suite插件依赖,如图2-4:

Name为:SpringSource Tool Suite Dependencies

Location为:http://dist.springsource.com/release/TOOLS/composite/e3.6

 

图2-4 安装

3、安装SpringSource Tool Suite插件,只需安装如图2-5所选中的就可以:

Name为:SpringSource Tool Suite

Location为:http://dist.springsource.com/release/TOOLS/update/e3.6

 

图2-4 安装

4、安装完毕,开始项目搭建吧。

Spring 依赖:本书使用spring-framework-3.0.5.RELEASE

                    spring-framework-3.0.5.RELEASE-with-docs.zip表示此压缩包带有文档的;

                    spring-framework-3.0.5.RELEASE-dependencies.zip表示此压缩包中是spring的依赖jar包,所以需要什么依赖从这里找就好了;

                   下载地址:http://www.springsource.org/download

 

二、开始Spring Hello World之旅

1、准备需要的jar包

  核心jar包:从下载的spring-framework-3.0.5.RELEASE-with-docs.zip中dist目录查找如下jar包

org.springframework.asm-3.0.5.RELEASE.jar

org.springframework.core-3.0.5.RELEASE.jar

org.springframework.beans-3.0.5.RELEASE.jar

org.springframework.context-3.0.5.RELEASE.jar

org.springframework.expression-3.0.5.RELEASE.jar

 

 

 

 

 

 

 

 

 

 

  依赖的jar包:从下载的spring-framework-3.0.5.RELEASE-dependencies.zip中查找如下依赖jar包

com.springsource.org.apache.log4j-1.2.15.jar

com.springsource.org.apache.commons.logging-1.1.1.jar

com.springsource.org.apache.commons.collections-3.2.1.jar

 

 

 

 

 

 

 

 

 

2、创建标准Java工程:

(1)选择“window”—> “Show View” —>“Package Explorer”,使用包结构视图;

 

图2-5 包结构视图

(2)创建标准Java项目,选择“File”—>“New”—>“Other”;然后在弹出来的对话框中选择“Java Project”创建标准Java项目;

 

图2-6 创建Java项目

 

图2-7 创建Java项目

 

图2-8 创建Java项目

       (3)配置项目依赖库文件,右击项目选择“Properties”;然后在弹出的对话框中点击“Add JARS”在弹出的对话框中选择“lib”目录下的jar包;然后再点击“Add Library”,然后在弹出的对话框中选择“Junit”,选择“Junit4”;

 

图2-9 配置项目依赖库文件

 

图2-10 配置项目依赖库文件

 

图2-11 配置项目依赖库文件

(4)项目目录结构如下图所示,其中“src”用于存放java文件;“lib”用于存放jar文件;“resources”用于存放配置文件;

 

图2-12 项目目录结构

 

3、项目搭建好了,让我们来开发接口,此处我们只需实现打印“Hello World!”,所以我们定义一个“sayHello”接口,代码如下:



java代码:
  1. package cn.javass.spring.chapter2.helloworld;  
  2. public interface HelloApi {  
  3.        public void sayHello();  
  4. }  

 

4、接口开发好了,让我们来通过实现接口来完成打印“Hello World!”功能;

 

java代码:
  1. package cn.javass.spring.chapter2.helloworld;  
  2. public class HelloImpl implements HelloApi {  
  3.               @Override  
  4.               public void sayHello() {  
  5.                      System.out.println("Hello World!");  
  6.               }  
  7. }  

 

5、接口和实现都开发好了,那如何使用Spring IoC容器来管理它们呢?这就需要配置文件,让IoC容器知道要管理哪些对象。让我们来看下配置文件chapter2/helloworld.xml(放到resources目录下):

 

java代码:
  1. <?xml version="1.0" encoding="UTF-8"?>  
  2. <beans  
  3. xmlns="http://www.springframework.org/schema/beans"  
  4. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
  5. xmlns:context="http://www.springframework.org/schema/context"  
  6. xsi:schemaLocation="  
  7. http://www.springframework.org/schema/beans        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd  
  8. http://www.springframework.org/schema/context                http://www.springframework.org/schema/context/spring-context-3.0.xsd">  
  9.   <!-- id 表示你这个组件的名字,class表示组件类 -->  
  10. <bean id="hello" class="cn.javass.spring.chapter2.helloworld.HelloImpl"></bean>  
  11. </beans>  

 

6、现在万一具备,那如何获取IoC容器并完成我们需要的功能呢?首先应该实例化一个IoC容器,然后从容器中获取需要的对象,然后调用接口完成我们需要的功能,代码示例如下:

 

java代码:
  1. package cn.javass.spring.chapter2.helloworld;  
  2. import org.junit.Test;  
  3. import org.springframework.context.ApplicationContext;  
  4. import org.springframework.context.support.ClassPathXmlApplicationContext;  
  5. public class HelloTest {  
  6.        @Test  
  7.        public void testHelloWorld() {  
  8.              //1、读取配置文件实例化一个IoC容器  
  9.              ApplicationContext context = new ClassPathXmlApplicationContext("helloworld.xml");  
  10.              //2、从容器中获取Bean,注意此处完全“面向接口编程,而不是面向实现”  
  11.               HelloApi helloApi = context.getBean("hello", HelloApi.class);  
  12.               //3、执行业务逻辑  
  13.               helloApi.sayHello();  
  14.        }  
  15. }  
  16.    

 

7、自此一个完整的Spring Hello World已完成,是不是很简单,让我们深入理解下容器和Bean吧。

2.2.4  详解IoC容器

在Spring Ioc容器的代表就是org.springframework.beans包中的BeanFactory接口,BeanFactory接口提供了IoC容器最基本功能;而org.springframework.context包下的ApplicationContext接口扩展了BeanFactory,还提供了与Spring AOP集成、国际化处理、事件传播及提供不同层次的context实现 (如针对web应用的WebApplicationContext)。简单说, BeanFactory提供了IoC容器最基本功能,而 ApplicationContext 则增加了更多支持企业级功能支持。ApplicationContext完全继承BeanFactory,因而BeanFactory所具有的语义也适用于ApplicationContext。

容器实现一览:

• XmlBeanFactoryBeanFactory实现,提供基本的IoC容器功能,可以从classpath或文件系统等获取资源;

  (1)  File file = new File("fileSystemConfig.xml");

           Resource resource = new FileSystemResource(file);

           BeanFactory beanFactory = new XmlBeanFactory(resource);

  (2)

          Resource resource = new ClassPathResource("classpath.xml");                 

          BeanFactory beanFactory = new XmlBeanFactory(resource);

 

• ClassPathXmlApplicationContextApplicationContext实现,从classpath获取配置文件;

         BeanFactory beanFactory = new ClassPathXmlApplicationContext("classpath.xml");

• FileSystemXmlApplicationContextApplicationContext实现,从文件系统获取配置文件。

         BeanFactory beanFactory = new FileSystemXmlApplicationContext("fileSystemConfig.xml");

 

具体代码请参考cn.javass.spring.chapter2.InstantiatingContainerTest.java。

 

ApplicationContext接口获取Bean方法简介:

• Object getBean(String name) 根据名称返回一个Bean,客户端需要自己进行类型转换;

• T getBean(String name, Class<T> requiredType) 根据名称和指定的类型返回一个Bean,客户端无需自己进行类型转换,如果类型转换失败,容器抛出异常;

• T getBean(Class<T> requiredType) 根据指定的类型返回一个Bean,客户端无需自己进行类型转换,如果没有或有多于一个Bean存在容器将抛出异常;

• Map<String, T> getBeansOfType(Class<T> type) 根据指定的类型返回一个键值为名字和值为Bean对象的 Map,如果没有Bean对象存在则返回空的Map。

 

让我们来看下IoC容器到底是如何工作。在此我们以xml配置方式来分析一下:

 

一、准备配置文件:就像前边Hello World配置文件一样,在配置文件中声明Bean定义也就是为Bean配置元数据。

二、由IoC容器进行解析元数据: IoC容器的Bean Reader读取并解析配置文件,根据定义生成BeanDefinition配置元数据对象,IoC容器根据BeanDefinition进行实例化、配置及组装Bean。

三、实例化IoC容器:由客户端实例化容器,获取需要的Bean。

 

整个过程是不是很简单,执行过程如图2-5,其实IoC容器很容易使用,主要是如何进行Bean定义。下一章我们详细介绍定义Bean。

 

图2-5 Spring Ioc容器

2.2.5  小结

除了测试程序的代码外,也就是程序入口,所有代码都没有出现Spring任何组件,而且所有我们写的代码没有实现框架拥有的接口,因而能非常容易的替换掉Spring,是不是非入侵。

客户端代码完全面向接口编程,无需知道实现类,可以通过修改配置文件来更换接口实现,客户端代码不需要任何修改。是不是低耦合。

如果在开发初期没有真正的实现,我们可以模拟一个实现来测试,不耦合代码,是不是很方便测试。

Bean之间几乎没有依赖关系,是不是很容易重用。

 

转自【http://sishuok.com/forum/blogPost/list/2428.html

 

 

分享到:
评论
43 楼 lu-xiansheng 2016-08-08  
讨厌淡紫色 写道
ApplicationContext context = new ClassPathXmlApplicationContext("helloworld.xml");  这行有误,应该是 ApplicationContext context=new ClassPathXmlApplicationContext("chapter2/helloworld.xml");


你创建的resource文件夹是普通的文件夹,因该改为创建source Folder。
42 楼 讨厌淡紫色 2016-02-01  
ApplicationContext context = new ClassPathXmlApplicationContext("helloworld.xml");  这行有误,应该是 ApplicationContext context=new ClassPathXmlApplicationContext("chapter2/helloworld.xml");
41 楼 huluyisheng 2015-06-29  
huluyisheng 写道
log4j:WARN No appenders could be found for logger (org.springframework.context.support.ClassPathXmlApplicationContext).
log4j:WARN Please initialize the log4j system properly.

log4j需要怎么安装?
谢谢



发现不是log4j的问题,
ApplicationContext context = new ClassPathXmlApplicationContext("helloworld.xml"); 
    
的xml路径需要全路径。

初学者,见谅。
40 楼 huluyisheng 2015-06-29  
log4j:WARN No appenders could be found for logger (org.springframework.context.support.ClassPathXmlApplicationContext).
log4j:WARN Please initialize the log4j system properly.

log4j需要怎么安装?
谢谢
39 楼 左翼凋零 2014-12-30  
这么多图片都挂了。。。好困扰啊。。
38 楼 stonefeng 2014-10-09  
求楼主修复图片
37 楼 xiefengfeng 2014-06-07  
使用“Add Class Folder"按钮把resources文件夹放到项目的classpath里。“Add Class Folder"按钮在 "Add JARs"按钮所在的那个向导页。

pyez1158 写道
楼主,resources 那个文件夹应该放在src下面吧,跟src同级程序报错?

36 楼 s33ker 2014-05-13  
图片都挂了
35 楼 pyez1158 2014-04-24  
楼主,resources 那个文件夹应该放在src下面吧,跟src同级程序报错?
34 楼 nudtgk2000 2013-02-16  
博主是不是还在问答上帮助过我嘞?
33 楼 nudtgk2000 2013-02-16  
文中有些步骤的介绍是不是该修改一下,学习实例的时候到处查到处找才搞定,记在这里了http://blog.csdn.net/nudtgk2000/article/details/8582043
32 楼 jinnianshilongnian 2012-11-29  
307622798 写道
jinnianshilongnian 写道
307622798 写道
博主,你好,看了你的博客收获很大。我有一个小小的问题想问问博主。
在配置文件中,有一个string类型的bean,我取名为name
<bean id="name" name="name" class="java.lang.String">
<constructor-arg value="xiezhong"></constructor-arg>
</bean> 

测试:
String configLocation = "classpath:testSpring-servlet.xml"; 
ApplicationContext ctx = new ClassPathXmlApplicationContext(configLocation);
String name = ctx.getBean("name",java.lang.String.class);

这里就报错说应该org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'xname' must be of type [java.lang.String], but was actually of type [$Proxy11]
还请博主指导指导,先谢过啦!呵呵

你里边有使用aop吧


这里就报错说应该org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'xname' must be of type [java.lang.String], but was actually of type [$Proxy11]

你的String被代理了

嗯嗯,对了,我之前写过AOP的例子。可是那个代理什么都没做啊。那我这里该如何做呢,假如我不想删除那个代理?(*^__^*) 嘻嘻

那就在aop部分排除这个
31 楼 307622798 2012-11-29  
jinnianshilongnian 写道
307622798 写道
博主,你好,看了你的博客收获很大。我有一个小小的问题想问问博主。
在配置文件中,有一个string类型的bean,我取名为name
<bean id="name" name="name" class="java.lang.String">
<constructor-arg value="xiezhong"></constructor-arg>
</bean> 

测试:
String configLocation = "classpath:testSpring-servlet.xml"; 
ApplicationContext ctx = new ClassPathXmlApplicationContext(configLocation);
String name = ctx.getBean("name",java.lang.String.class);

这里就报错说应该org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'xname' must be of type [java.lang.String], but was actually of type [$Proxy11]
还请博主指导指导,先谢过啦!呵呵

你里边有使用aop吧


这里就报错说应该org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'xname' must be of type [java.lang.String], but was actually of type [$Proxy11]

你的String被代理了

嗯嗯,对了,我之前写过AOP的例子。可是那个代理什么都没做啊。那我这里该如何做呢,假如我不想删除那个代理?(*^__^*) 嘻嘻
30 楼 jinnianshilongnian 2012-11-29  
307622798 写道
博主,你好,看了你的博客收获很大。我有一个小小的问题想问问博主。
在配置文件中,有一个string类型的bean,我取名为name
<bean id="name" name="name" class="java.lang.String">
<constructor-arg value="xiezhong"></constructor-arg>
</bean> 

测试:
String configLocation = "classpath:testSpring-servlet.xml"; 
ApplicationContext ctx = new ClassPathXmlApplicationContext(configLocation);
String name = ctx.getBean("name",java.lang.String.class);

这里就报错说应该org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'xname' must be of type [java.lang.String], but was actually of type [$Proxy11]
还请博主指导指导,先谢过啦!呵呵

你里边有使用aop吧


这里就报错说应该org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'xname' must be of type [java.lang.String], but was actually of type [$Proxy11]

你的String被代理了
29 楼 307622798 2012-11-29  
博主,你好,看了你的博客收获很大。我有一个小小的问题想问问博主。
在配置文件中,有一个string类型的bean,我取名为name
<bean id="name" name="name" class="java.lang.String">
<constructor-arg value="xiezhong"></constructor-arg>
</bean> 

测试:
String configLocation = "classpath:testSpring-servlet.xml"; 
ApplicationContext ctx = new ClassPathXmlApplicationContext(configLocation);
String name = ctx.getBean("name",java.lang.String.class);

这里就报错说应该org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'xname' must be of type [java.lang.String], but was actually of type [$Proxy11]
还请博主指导指导,先谢过啦!呵呵
28 楼 rtttyu23 2012-11-05  
jinnianshilongnian 写道
rtttyu23 写道
spring-framework-3.0.5.RELEASE-dependencies.zip,官网上好像没有吧?只找到3.0.2的。
能有什么办法把一堆Class JAR包关联到它的源代码。
比如spring-framework-3.0.5.RELEASE-with-docs.zip中dist目录下的所有jar包关联到所对应的源代码。

建议使用maven做依赖管理 


好的!那我先看看MAVEN(没接触过)。 
27 楼 jinnianshilongnian 2012-11-05  
rtttyu23 写道
spring-framework-3.0.5.RELEASE-dependencies.zip,官网上好像没有吧?只找到3.0.2的。
能有什么办法把一堆Class JAR包关联到它的源代码。
比如spring-framework-3.0.5.RELEASE-with-docs.zip中dist目录下的所有jar包关联到所对应的源代码。

建议使用maven做依赖管理 
26 楼 rtttyu23 2012-11-05  
spring-framework-3.0.5.RELEASE-dependencies.zip,官网上好像没有吧?只找到3.0.2的。
能有什么办法把一堆Class JAR包关联到它的源代码。
比如spring-framework-3.0.5.RELEASE-with-docs.zip中dist目录下的所有jar包关联到所对应的源代码。
25 楼 jinnianshilongnian 2012-10-23  
bexiu5367 写道
rtttyu23 写道
jinnianshilongnian 写道
rtttyu23 写道
请问一下:commons-logging-1.1.1.jar、commons-logging-api-1.1.jar。这两个包有什么区别?


commons-logging.jar
The commons-logging.jar file includes the JCL API, the default LogFactory implemenation and thin-wrapper Log implementations for Log4J, Avalon LogKit, the Avalon Framework's logging infrastructure, JDK 1.4, as well as an implementation of JDK 1.4 logging APIs (JSR-47) for pre-1.4 systems. In most cases, including commons-logging.jar and your preferred logging implementation in the classpath should be all that is required to use JCL.


commons-logging-api.jar
The commons-logging-api.jar file includes the JCL API and the default LogFactory implementation as well as the built-in Log implementations SimpleLog and NoOpLog. However it does not include the wrapper Log implementations that require additional libraries such as Log4j, Avalon and Lumberjack. This jar is intended for use by projects that recompile the commons-logging source using alternate java environments, and cannot compile against all of the optional libraries that the Apache release of commons-logging supports. Because of the reduced dependencies of this jarfile, such projects should be able to create an equivalent of this library with fewer difficulties. This jar is also useful for build environments that automatically track dependencies, and thus have difficulty with the concept that the main commons-logging.jar has "optional" dependencies on various logging implementations that can safely go unsatisfied at runtime.




简单地说, commons-logging-api.jar仅包含定义接口的类, 而commons-logging.jar是其的一种实现。
官网可得http://commons.apache.org/logging/guide.html#commons-logging.jar。

不是的。 两个都包含实现。
commons-logging.jar 提供了一些额外的实现 如支持jdk1.3  而commons-logging-api.jar最低1.4

是这样的  你仔细读读我给你发哦
24 楼 bexiu5367 2012-10-23  
rtttyu23 写道
jinnianshilongnian 写道
rtttyu23 写道
请问一下:commons-logging-1.1.1.jar、commons-logging-api-1.1.jar。这两个包有什么区别?


commons-logging.jar
The commons-logging.jar file includes the JCL API, the default LogFactory implemenation and thin-wrapper Log implementations for Log4J, Avalon LogKit, the Avalon Framework's logging infrastructure, JDK 1.4, as well as an implementation of JDK 1.4 logging APIs (JSR-47) for pre-1.4 systems. In most cases, including commons-logging.jar and your preferred logging implementation in the classpath should be all that is required to use JCL.


commons-logging-api.jar
The commons-logging-api.jar file includes the JCL API and the default LogFactory implementation as well as the built-in Log implementations SimpleLog and NoOpLog. However it does not include the wrapper Log implementations that require additional libraries such as Log4j, Avalon and Lumberjack. This jar is intended for use by projects that recompile the commons-logging source using alternate java environments, and cannot compile against all of the optional libraries that the Apache release of commons-logging supports. Because of the reduced dependencies of this jarfile, such projects should be able to create an equivalent of this library with fewer difficulties. This jar is also useful for build environments that automatically track dependencies, and thus have difficulty with the concept that the main commons-logging.jar has "optional" dependencies on various logging implementations that can safely go unsatisfied at runtime.




简单地说, commons-logging-api.jar仅包含定义接口的类, 而commons-logging.jar是其的一种实现。
官网可得http://commons.apache.org/logging/guide.html#commons-logging.jar。

不是的。 两个都包含实现。
commons-logging.jar 提供了一些额外的实现 如支持jdk1.3  而commons-logging-api.jar最低1.4

相关推荐

    跟我学spring3(1-7)

    【第二章】 IoC 之 2.2 IoC 容器基本原理 ——跟我学Spring3 【第二章】 IoC 之 2.3 IoC的配置使用——跟我学Spring3 【第三章】 DI 之 3.1 DI的配置使用 ——跟我学spring3 【第三章】 DI 之 3.2 循环依赖 ——跟我...

    跟我学Spring系列1

    【第二章】 IoC 之 2.2 IoC 容器基本原理 ——跟我学【第二章】 IoC 之 2.3 IoC的配置使用——跟我学Spring3【第三章】 DI 之 3

    跟我学spring3(1-7)1

    1.1 【第二章】 IoC 之 2.3 IoC的配置使用——跟我学Spring3 41.3 【第二章】 IoC 之 2.2 IoC 容器基本原理 ——跟我学Sp

    跟开涛学Spring

    1.3 【第二章】 IoC 之 2.2 IoC 容器基本原理 ——跟我学Spring3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 1.4 【第三章】 DI 之 3.1 DI的配置使用 ——跟我学spring3 . . . . . . . . . . ....

    跟我学spring3(1-7).pdf

    Spring概述2.1 IoC基础2.2 IoC 容器基本原理2.3 IoC的配置使用——跟我学Spring33.1 DI的配置使用3.2 循环依赖3.3 更多DI的知识 3.4 Bean的作用域 4.1 基础知识4.2 内置Resource实现4.3 访问Resource4.4 Resource...

    跟我学spring3 .pdf

    详细讲解了 IOC DI AOP JDBC MVC 等等spring知识,有很高的学习价值

    跟我学spring3(8-13).pdf

    spring3基础知识 IoC DI Spring表达式 SpEL Spring JDBC支持 Spring ORM集成 Spring与其他web框架集成 Spring注解零配置 Spring单元测试与集成测试

    spring杂谈 作者zhang KaiTao

    1. spring杂谈[原创] 1.1 Spring事务处理时自我调用的解决方案及一些实现方式的风险 ...1.32 Spring3 Web MVC下的数据类型转换(第一篇)——《跟我学Spring3 Web MVC》抢先看 1.33 Spring 注入集合类型

    spring2.0学习源码

    spring学习资料集合,源码+文档 注释详细 完全超值。 jdk代理,springAOP,IOC,注入全部 分工程详细介绍,这是我个人总结的想了好久决定拿出来跟大家分享,希望更多的人能够掌握它,谢谢

    asp.net知识库

    ASP.NET 2.0使用Web Part创建应用程序之二(共二) 体验 .net2.0 的优雅(2) -- ASP.net 主题和皮肤 NET2.0系列介绍(一).NET 2.0 中Web 应用程序主题的切换 ASP.NET 2.0 中Web 应用程序主题的切换 2.0正式版中...

    基于J2EE框架的个人博客系统项目毕业设计论文(源码和论文)

    第二章 系统设计 2.1. 系统分析 在整个blog进行开发之前,要确定出整个项目的整体架构,包括系统的选型、运行环境的确定及系统结构设计。下面对这进行详细介绍。 在进行软件系统开发的最初环节,一般都需要进行...

    JAVA自学之路

    一般来讲,搜索引擎可以搜到各种知识点,我曾经跟同学们开玩笑说:“学会了怎么google或者baidu,其实没必要跟老师学了,自己全都搞懂了,尚学堂是没必要来的。”当然,只是玩笑,培训的作用有三个: A:系统化...

Global site tag (gtag.js) - Google Analytics