Core Technologies
文章平均质量分 91
Spring 框架核心技术(Core Technologies)
月满闲庭
资深IT工作者
展开
-
精编Spring框架文档下载页面
Spring Framework DocumentationSpring框架文档5.3.10Core Technologies 核心技术部分中英双语版 第一部分 中英双语版 第二部分 中文版 第一部分 中文版 第二部分原创 2021-10-05 07:47:09 · 335 阅读 · 0 评论 -
Spring框架文档 - 核心技术部分 中文版 - 第二部分 内容目录
Spring Framework Documentation5.3.10Core Technologies返回文档下载页面:2. 资源 2732.1..介绍 2732.2. Resource 接口 2732.3.内置Resource 实现 2752.3.1. UrlResource 2752.3.2. ClassPathResource 2762.3.3. FileSystemResource 2762.3.4. PathResource 277.原创 2021-10-05 07:43:05 · 307 阅读 · 0 评论 -
Spring框架文档 - 核心技术部分 中文版 - 第一部分 内容目录
Spring Framework Documentation5.3.10Core Technologies返回文档下载页面:Spring框架文档 - 核心技术部分 中文版 - 第一部分 内容目录1. IoC容器 101.1. Spring IoC容器和bean简介 101.2.容器概览 111.2.1.配置元数据 121.2.2.实例化一个容器 141.2.2.1.组合基于XML的配置元数据 161.2.2.2. Groovy Bean定义DSL 17.原创 2021-10-05 07:40:26 · 400 阅读 · 0 评论 -
Spring框架文档 - 核心技术部分 中英双语版 第二部分 内容目录
Spring Framework Documentation5.3.10Core Technologies更多网页章节内容,请点击查看:Core Technologies返回文档下载页面:Spring框架文档 - 核心技术部分 中英双语版 第二部分 内容目录2. Resources (资源) 4072.1. Introduction(介绍) 4072.2. TheResourceInterface(Resource接口)... 4082.3. Bu...原创 2021-10-05 07:37:53 · 927 阅读 · 0 评论 -
Spring框架文档 - 核心技术部分 中英双语版 第一部分 内容目录
Spring Framework Documentation5.3.10Core Technologies更多网页章节内容,请点击查看:Core Technologies返回文档下载页面:Spring框架文档 - 核心技术部分 中英双语版 第一部分内容目录1. The IoC Container (IoC容器)... 101.1. Introduction to the Spring IoC Container and Beans(Spring IoC容器和bea...原创 2021-10-05 07:32:28 · 766 阅读 · 0 评论 -
1.8. Container Extension Points 容器扩展点
1.8. Container Extension Points 容器扩展点Typically, an application developer does not need to subclassApplicationContextimplementation classes. Instead, the Spring IoC container can be extended by plugging in implementations of special integration in...原创 2021-10-01 09:59:34 · 213 阅读 · 0 评论 -
1.7. Bean Definition Inheritance(Bean定义继承)
1.7. Bean Definition Inheritance(Bean定义继承)A bean definition can contain a lot of configuration information, including constructor arguments, property values, and container-specific information, such as the initialization method, a static factory me...原创 2021-10-01 09:58:48 · 187 阅读 · 0 评论 -
1.6.3. Other Aware Interfaces 其它Aware接口
1.6.3. OtherAwareInterfaces 其它Aware接口BesidesApplicationContextAwareandBeanNameAware(discussedearlier), Spring offers a wide range ofAwarecallback interfaces that let beans indicate to the container that they require a certain infrastructu...原创 2021-10-01 09:57:51 · 172 阅读 · 0 评论 -
1.6.2. ApplicationContextAware and BeanNameAware
1.6.2.ApplicationContextAwareandBeanNameAwareWhen anApplicationContextcreates an object instance that implements theorg.springframework.context.ApplicationContextAwareinterface, the instance is provided with a reference to thatApplicationCo...原创 2021-10-01 09:56:57 · 209 阅读 · 0 评论 -
1.6.1.6. Shutting Down the Spring IoC Container Gracefully in Non-Web Applications 在非web应用程序关闭Spring
1.6.1.6. Shutting Down the Spring IoC Container Gracefully in Non-Web Applications 在非web应用程序优雅地关闭Spring IoC容器 This section applies only to non-web applications. Spring’s web-basedApplicationContextimplementations already have code ...原创 2021-10-01 09:55:40 · 173 阅读 · 0 评论 -
1.6.1.5. Startup and Shutdown Callbacks 启动和停止回调
1.6.1.5. Startup and Shutdown Callbacks 启动和停止回调TheLifecycleinterface defines the essential methods for any object that has its own lifecycle requirements (such as starting and stopping some background process):Lifecycle接口定义了具有自己生命周期需求的任何对象的基本方法(...原创 2021-10-01 09:53:47 · 358 阅读 · 0 评论 -
1.6.1.4. Combining Lifecycle Mechanisms(合并生命周期机制)
1.6.1.4. Combining Lifecycle Mechanisms 合并生命周期机制As of Spring 2.5, you have three options for controlling bean lifecycle behavior:TheInitializingBeanandDisposableBeancallback interfaces Custominit() anddestroy() methods The@PostConstruc...原创 2021-10-01 10:00:16 · 177 阅读 · 0 评论 -
1.6.1.3. Default Initialization and Destroy Methods(默认初始化和销毁方法)
1.6.1.3. Default Initialization and Destroy Methods默认初始化和销毁方法When you write initialization and destroy method callbacks that do not use the Spring-specificInitializingBeanandDisposableBeancallback interfaces, you typically write methods with name...原创 2021-09-30 15:28:49 · 244 阅读 · 0 评论 -
1.6. Customizing the Nature of a Bean 自定义bean的性质
Spring Framework Documentation(5.3.10)Core IoC Container, Events, Resources, i18n, Validation, Data Binding, Type Conversion, SpEL, AOP. Core Technologies1. The IoC Container1.1. Introduction to the Spring IoC Container and Beans(Sp...原创 2021-09-30 15:25:52 · 206 阅读 · 0 评论 -
1.5.5.2. Using a Custom Scope (使用自定义作用域)
1.5.5.2. Using a Custom Scope (使用自定义作用域)After you write and test one or more customScopeimplementations, you need to make the Spring container aware of your new scopes. The following method is the central method to register a newScopewith the Spr...原创 2021-09-30 14:26:10 · 178 阅读 · 0 评论 -
1.5.5. Custom Scopes (自定义作用域)
1.5.5. Custom Scopes (自定义作用域)The bean scoping mechanism is extensible. You can define your own scopes or even redefine existing scopes, although the latter is considered bad practice and you cannot override the built-insingletonandprototypescop...原创 2021-09-30 14:26:35 · 337 阅读 · 0 评论 -
1.5.4.5.1 Choosing the Type of Proxy to Create(选择待创建代理的类型)
1.5.4.5.1Choosing the Type of Proxy to Create(选择待创建代理的类型)By default, when the Spring container creates a proxy for a bean that is marked up with the<aop:scoped-proxy/>element, a CGLIB-based class proxy is created.默认情况下,当Spring容器为标记有<a...原创 2021-09-30 14:26:46 · 169 阅读 · 0 评论 -
1.5.4.5. Scoped Beans as Dependencies (具有作用域的bean作为依赖项)
1.5.4.5. Scoped Beans as Dependencies (具有作用域的bean作为依赖项)The Spring IoC container manages not only the instantiation of your objects (beans), but also the wiring up of collaborators (or dependencies). If you want to inject (for example) an HTTP reque...原创 2021-09-30 14:26:59 · 307 阅读 · 0 评论 -
1.5.4.4. Application Scope(应用作用域)
1.5.4.4. Application Scope(应用作用域)Consider the following XML configuration for a bean definition:考虑以下bean定义的XML配置:<bean id="appPreferences" class="com.something.AppPreferences" scope="application"/>The Spring container creates a new ins...原创 2021-09-30 14:27:14 · 1169 阅读 · 0 评论 -
1.5.4.3. Session Scope(会话作用域)
1.5.4.3. Session Scope(会话作用域)Consider the following XML configuration for a bean definition:考虑以下bean定义的XML配置:<bean id="userPreferences" class="com.something.UserPreferences" scope="session"/>The Spring container creates a new instance ...原创 2021-09-30 14:27:24 · 665 阅读 · 0 评论 -
1.5.4.2. Request scope(请求作用域)
1.5.4.2. Request scope (请求作用域)Consider the following XML configuration for a bean definition:为bean定义考虑以下XML配置:<bean id="loginAction" class="com.something.LoginAction" scope="request"/>The Spring container creates a new instance of the...原创 2021-09-27 17:57:49 · 849 阅读 · 0 评论 -
1.5.4.1. Initial Web Configuration 初始化Web配置
To support the scoping of beans at therequest,session,application, andwebsocketlevels (web-scoped beans), some minor initial configuration is required before you define your beans. (This initial setup is not required for the standard scopes:s...原创 2021-09-27 17:57:36 · 233 阅读 · 0 评论 -
1.5.4. Request, Session, Application, and WebSocket Scopes
1.5.4. Request, Session, Application, and WebSocket Scopes(Request, Session, Application, and WebSocket作用域)Therequest,session,application, andwebsocketscopes are available only if you use a web-aware SpringApplicationContextimplementation (suc...原创 2021-09-27 17:57:21 · 243 阅读 · 0 评论 -
1.5.3. Singleton Beans with Prototype-bean Dependencies(单例和原型Bean的依赖)
When you use singleton-scoped beans with dependencies on prototype beans, be aware that dependencies are resolved at instantiation time. Thus, if you dependency-inject a prototype-scoped bean into a singleton-scoped bean, a new prototype bean is in...原创 2021-09-27 17:57:08 · 175 阅读 · 0 评论 -
1.5.2. The Prototype Scope(Prototype作用域)
The non-singleton prototype scope of bean deployment results in the creation of a new bean instance every time a request for that specific bean is made. That is, the bean is injected into another bean or you request it through agetBean() method cal...原创 2021-09-27 17:56:54 · 297 阅读 · 0 评论 -
1.5.1. The Singleton Scope (单例作用域)
Only one shared instance of a singleton bean is managed, and all requests for beans with an ID or IDs that match that bean definition result in that one specific bean instance being returned by the Spring container.只管理一个单例bean的一个共享实例,对具有ID或ID与bean定...原创 2021-09-27 17:56:32 · 261 阅读 · 0 评论 -
1.5. Bean Scopes(Bean作用域)
1.5. Bean Scopes(Bean作用域)When you create a bean definition, you create a recipe for creating actual instances of the class defined by that bean definition. The idea that a bean definition is a recipe is important, because it means that, as with a c...原创 2021-09-27 17:52:27 · 213 阅读 · 0 评论 -
1.4.6.2. Arbitrary Method Replacement(任意方法替换)
Spring Framework Documentation(5.3.10)Core IoC Container, Events, Resources, i18n, Validation, Data Binding, Type Conversion, SpEL, AOP. Core Technologies1. The IoC Container1.1. Introduction to the Spring IoC Container and Beans(Sp...原创 2021-09-27 17:52:52 · 176 阅读 · 0 评论 -
Spring框架文档(5.3.10) - 核心技术(Core Technologies)
Core Technologies1. The IoC Container1.1. Introduction to the Spring IoC Container and Beans(Spring IoC容器和bean简介)1.2. Container Overview (容器概览)1.1. Introduction to the Spring IoC Container and Beans(Spring IoC容器和bean简介)1.2.1. Configuration Metada原创 2021-09-24 16:09:11 · 224 阅读 · 0 评论 -
Core Technologies
This part of the reference documentation covers all the technologies that are absolutely integral to the Spring Framework.Foremost amongst these is the Spring Framework’s Inversion of Control (IoC) container. A thorough treatment of the Spring Framework’原创 2021-09-23 21:43:02 · 387 阅读 · 0 评论 -
1.1. Introduction to the Spring IoC Container and Beans(Spring IoC容器和bean简介)
This chapter covers the Spring Framework implementation of the Inversion of Control (IoC) principle. IoC is also known as dependency injection (DI). It is a process whereby objects define their dependencies (that is, the other objects they work with) only原创 2021-09-23 21:45:36 · 279 阅读 · 0 评论 -
1.2. Container Overview 容器概览
Theorg.springframework.context.ApplicationContextinterface represents the Spring IoC container and is responsible for instantiating, configuring, and assembling the beans. The container gets its instructions on what objects to instantiate, configure, and..原创 2021-09-23 21:47:10 · 195 阅读 · 0 评论 -
1.2.1. Configuration Metadata 配置元数据
As the preceding diagram shows, the Spring IoC container consumes a form of configuration metadata. This configuration metadata represents how you, as an application developer, tell the Spring container to instantiate, configure, and assemble the objects i原创 2021-09-23 21:51:48 · 529 阅读 · 0 评论 -
1.2.2.1 Composing XML-based Configuration Metadata组合基于XML的配置元数据
It can be useful to have bean definitions span multiple XML files. Often, each individual XML configuration file represents a logical layer or module in your architecture.让bean定义跨越多个XML文件可能很有用。通常,每个单独的XML配置文件都表示你的体系结构中的一个逻辑层或模块。You can use the applicat原创 2021-09-23 22:24:34 · 170 阅读 · 0 评论 -
1.2.2.2 The Groovy Bean Definition DSL (Groovy Bean定义DSL)
As a further example for externalized configuration metadata, bean definitions can also be expressed in Spring’s Groovy Bean Definition DSL, as known from the Grails framework. Typically, such configuration live in a ".groovy" file with the structure shown原创 2021-09-23 22:26:00 · 211 阅读 · 0 评论 -
1.2.2. Instantiating a Container (实例化一个容器)
The location path or paths supplied to anApplicationContextconstructor are resource strings that let the container load configuration metadata from a variety of external resources, such as the local file system, the JavaCLASSPATH, and so on.提供给Applica...原创 2021-09-23 22:15:18 · 162 阅读 · 0 评论 -
1.2.3. Using the Container 使用容器
TheApplicationContextis the interface for an advanced factory capable of maintaining a registry of different beans and their dependencies. By using the methodT getBean(String name, Class<T> requiredType), you can retrieve instances of your beans....原创 2021-09-23 22:29:47 · 204 阅读 · 0 评论 -
1.3. Bean Overview (Bean概览)
A Spring IoC container manages one or more beans. These beans are created with the configuration metadata that you supply to the container (for example, in the form of XML<bean/>definitions).Spring IoC容器管理一个或多个bean。这些bean是使用您提供给容器的配置元数据创建的(例如,以XM..原创 2021-09-23 22:32:57 · 209 阅读 · 0 评论 -
1.4.5. Autowiring Collaborators(自动装配协作者)
1.4.5. Autowiring Collaborators(自动装配协作者)The Spring container can autowire relationships between collaborating beans. You can let Spring resolve collaborators (other beans) automatically for your bean by inspecting the contents of theApplicationCon...原创 2021-09-26 09:44:12 · 213 阅读 · 0 评论 -
1.4.5.2. Excluding a Bean from Autowiring(在自动装配中排除bean)
1.4.5.2. Excluding a Bean from Autowiring(在自动装配中排除bean)On a per-bean basis, you can exclude a bean from autowiring. In Spring’s XML format, set theautowire-candidateattribute of the<bean/>element tofalse. The container makes that specifi...原创 2021-09-27 17:51:22 · 232 阅读 · 0 评论