Spring Framework目录

Core Technologies

This part of the reference documentation covers all the technologies that are absolutely integral to the Spring Framework.

参考文档的这一部分涵盖了Spring框架绝对不可或缺的所有技术。

Foremost amongst these is the Spring Framework’s Inversion of Control (IoC) container. A thorough treatment of the Spring Framework’s IoC container is closely followed by comprehensive coverage of Spring’s Aspect-Oriented Programming (AOP) technologies. The Spring Framework has its own AOP framework, which is conceptually easy to understand and which successfully addresses the 80% sweet spot of AOP requirements in Java enterprise programming.

其中最重要的是Spring框架的控制反转(IoC)容器。在对Spring框架的IoC容器进行彻底处理之后,紧接着全面介绍Spring的面向切面编程(AOP)技术。Spring框架有自己的AOP框架,它在概念上很容易理解,并且成功地解决了Java企业编程中AOP需求的80%的痛点。

Coverage of Spring’s integration with AspectJ (currently the richest — in terms of features — and certainly most mature AOP implementation in the Java enterprise space) is also provided.

还介绍了Spring与AspectJ的集成(就特性而言,目前AspectJ是最丰富的,当然也是Java企业领域中最成熟的AOP实现)。

1. The IoC Container

1.1. Introduction to the Spring IoC Container and Beans

1.2. Container Overview

1.2.1. Configuration Metadata

1.2.2. Instantiating a Container

1.2.3. Using the Container

1.3. Bean Overview

1.3.1. Naming Beans

1.3.2. Instantiating Beans

1.4. Dependencies

1.4.1. Dependency Injection

1.4.2. Dependencies and Configuration in Detail

1.4.3. Using depends-on

1.4.4. Lazy-initialized Beans

1.4.5. Autowiring Collaborators

1.4.6. Method Injection

1.5. Bean Scopes

1.5.1. The Singleton Scope

1.5.2. The Prototype Scope

1.5.3. Singleton Beans with Prototype-bean Dependencies

1.5.4. Request, Session, Application, and WebSocket Scopes

1.5.5. Custom Scopes

1.6. Customizing the Nature of a Bean

1.6.1. Lifecycle Callbacks

1.6.2. ApplicationContextAware and BeanNameAware

1.6.3. Other Aware Interfaces

1.7. Bean Definition Inheritance

1.8. Container Extension Points

1.8.1. Customizing Beans by Using a BeanPostProcessor

1.8.2. Customizing Configuration Metadata with a BeanFactoryPostProcessor

1.8.3. Customizing Instantiation Logic with a FactoryBean

1.9. Annotation-based Container Configuration

1.9.1. @Required

1.9.2. Using @Autowired

1.9.3. Fine-tuning Annotation-based Autowiring with @Primary

1.9.4. Fine-tuning Annotation-based Autowiring with Qualifiers

1.9.5. Using Generics as Autowiring Qualifiers

1.9.6. Using CustomAutowireConfigurer

1.9.7. Injection with @Resource

1.9.8. Using @Value

1.9.9. Using @PostConstruct and @PreDestroy

1.10. Classpath Scanning and Managed Components

1.10.1. @Component and Further Stereotype Annotations

1.10.2. Using Meta-annotations and Composed Annotations

1.10.3. Automatically Detecting Classes and Registering Bean Definitions

1.10.4. Using Filters to Customize Scanning

1.10.5. Defining Bean Metadata within Components

1.10.6. Naming Autodetected Components

1.10.7. Providing a Scope for Autodetected Components

1.10.8. Providing Qualifier Metadata with Annotations

1.10.9. Generating an Index of Candidate Components

1.11. Using JSR 330 Standard Annotations

1.11.1. Dependency Injection with @Inject and @Named

1.11.2. @Named and @ManagedBean: Standard Equivalents to the @Component Annotation

1.11.3. Limitations of JSR-330 Standard Annotations

1.12. Java-based Container Configuration

1.12.1. Basic Concepts: @Bean and @Configuration

1.12.2. Instantiating the Spring Container by Using AnnotationConfigApplicationContext

1.12.3. Using the @Bean Annotation

1.12.4. Using the @Configuration annotation

1.12.5. Composing Java-based Configurations

1.13. Environment Abstraction

1.13.1. Bean Definition Profiles

1.13.2. `PropertySource` Abstraction`

1.13.3. Using @PropertySource

1.13.4. Placeholder Resolution in Statements

1.14. Registering a LoadTimeWeaver

1.15. Additional Capabilities of the ApplicationContext

1.15.1. Internationalization using MessageSource

1.15.2. Standard and Custom Events

1.15.3. Convenient Access to Low-level Resources

1.15.4. Application Startup Tracking

1.15.5. Convenient ApplicationContext Instantiation for Web Applications

1.15.6. Deploying a Spring ApplicationContext as a Java EE RAR File

1.16. The BeanFactory API

1.16.1. BeanFactory or ApplicationContext?

2. Resources

2.1. Introduction

2.2. The Resource Interface

2.3. Built-in Resource Implementations

2.3.1. UrlResource

2.3.2. ClassPathResource

2.3.3. FileSystemResource

2.3.4. PathResource

2.3.5. ServletContextResource

2.3.6. InputStreamResource

2.3.7. ByteArrayResource

2.4. The ResourceLoader Interfacev

2.5. The ResourcePatternResolver Interface

2.6. The ResourceLoaderAware Interface

2.7. Resources as Dependencies

2.8. Application Contexts and Resource Paths

2.8.1. Constructing Application Contexts

2.8.2. Wildcards in Application Context Constructor Resource Paths

2.8.3. FileSystemResource Caveats

3. Validation, Data Binding, and Type Conversion

3.1. Validation by Using Spring’s Validator Interface

3.2. Resolving Codes to Error Messages

3.3. Bean Manipulation and the BeanWrapper

3.3.1. Setting and Getting Basic and Nested Properties

3.3.2. Built-in PropertyEditor Implementations

3.4. Spring Type Conversion

3.4.1. Converter SPI

3.4.2. Using ConverterFactory

3.4.3. Using GenericConverter

3.4.4. The ConversionService API

3.4.5. Configuring a ConversionService

3.4.6. Using a ConversionService Programmatically

3.5. Spring Field Formatting

3.5.1. The Formatter SPI

3.5.2. Annotation-driven Formatting

3.5.3. The FormatterRegistry SPI

3.5.4. The FormatterRegistrar SPI

3.5.5. Configuring Formatting in Spring MVC

3.6. Configuring a Global Date and Time Format

3.7. Java Bean Validation

3.7.1. Overview of Bean Validation

3.7.2. Configuring a Bean Validation Provider

3.7.3. Configuring a DataBinder

3.7.4. Spring MVC 3 Validation

4. Spring Expression Language (SpEL)

4.1. Evaluation

4.1.1. Understanding EvaluationContext

4.1.2. Parser Configuration

4.1.3. SpEL Compilation

4.2. Expressions in Bean Definitions

4.2.1. XML Configuration

4.2.2. Annotation Configuration

4.3. Language Reference

4.3.1. Literal Expressions

4.3.2. Properties, Arrays, Lists, Maps, and Indexers

4.3.3. Inline Lists

4.3.4. Inline Maps

4.3.5. Array Construction

4.3.6. Methods

4.3.7. Operators

4.3.8. Types

4.3.9. Constructors

4.3.10. Variables

4.3.11. Functions

4.3.12. Bean References

4.3.13. Ternary Operator (If-Then-Else)

4.3.14. The Elvis Operator

4.3.15. Safe Navigation Operator

4.3.16. Collection Selection

4.3.17. Collection Projection

4.3.18. Expression templating

4.4. Classes Used in the Examples

5. Aspect Oriented Programming with Spring

5.1. AOP Concepts

5.2. Spring AOP Capabilities and Goals

5.3. AOP Proxies

5.4. @AspectJ support

5.4.1. Enabling @AspectJ Support

5.4.2. Declaring an Aspect

5.4.3. Declaring a Pointcut

5.4.4. Declaring Advice

5.4.5. Introductions

5.4.6. Aspect Instantiation Models

5.4.7. An AOP Example

5.5. Schema-based AOP Support

5.5.1. Declaring an Aspect

5.5.2. Declaring a Pointcut

5.5.3. Declaring Advice

5.5.4. Introductions

5.5.5. Aspect Instantiation Models

5.5.6. Advisors

5.5.7. An AOP Schema Example

5.6. Choosing which AOP Declaration Style to Use

5.6.1. Spring AOP or Full AspectJ?

5.6.2. @AspectJ or XML for Spring AOP?

5.7. Mixing Aspect Types

5.8. Proxying Mechanisms

5.9. Programmatic Creation of @AspectJ Proxies

5.10. Using AspectJ with Spring Applications

5.10.1. Using AspectJ to Dependency Inject Domain Objects with Spring

5.10.2. Other Spring aspects for AspectJ

5.10.3. Configuring AspectJ Aspects by Using Spring IoC

5.10.4. Load-time Weaving with AspectJ in the SpringFramework

5.11. Further Resources

6. Spring AOP APIs

6.1. Pointcut API in Spring

6.1.1. Concepts

6.1.2. Operations on Pointcuts

6.1.3. AspectJ Expression Pointcuts

6.1.4. Convenience Pointcut Implementations

6.1.5. Pointcut Superclasses

6.1.6. Custom Pointcuts

6.2. Advice API in Spring

6.2.1. Advice Lifecycles

6.2.2. Advice Types in Spring

6.3. The Advisor API in Spring

6.4. Using the ProxyFactoryBean to Create AOP Proxies

6.4.1. Basics

6.4.2. JavaBean Properties

6.4.3. JDK- and CGLIB-based proxies

6.4.4. Proxying Interfaces

6.4.5. Proxying Classes

6.4.6. Using “Global” Advisors

6.5. Concise Proxy Definitions

6.6. Creating AOP Proxies Programmatically with the ProxyFactory

6.7. Manipulating Advised Objects

6.8. Using the "auto-proxy" facility

6.8.1. Auto-proxy Bean Definitions

6.9. Using TargetSource Implementations

6.9.1. Hot-swappable Target Sources

6.9.2. Pooling Target Sources

6.9.3. Prototype Target Sources

6.9.4. ThreadLocal Target Sources

6.10. Defining New Advice Types

7. Null-safety

7.1. Use cases

7.2. JSR-305 meta-annotations

8. Data Buffers and Codecs

8.1. DataBufferFactory

8.2. DataBuffer

8.3. PooledDataBuffer

8.4. DataBufferUtils

8.5. Codecs

8.6. Using DataBuffer

9. Logging

10. Appendix

10.1. XML Schemas

10.1.1. The util Schema

10.1.2. The aop Schema

10.1.3. The context Schema

10.1.4. The Beans Schema

10.2. XML Schema Authoring

10.2.1. Authoring the Schema

10.2.2. Coding a NamespaceHandler

10.2.3. Using BeanDefinitionParser

10.2.4. Registering the Handler and the Schema

10.2.5. Using a Custom Extension in Your Spring XML Configuration

10.2.6. More Detailed Examples

10.3. Application Startup Steps

posted @ 2022-09-02 09:22  丶Jan  阅读(68)  评论(0)    收藏  举报