Spring Framework 4.1.3 Reference Documentation--中文

http://spring.oschina.mopaas.com/

4.1.3.RELEASE

Copies of this document may be made for your own use and for distribution to others, provided that you do not charge any fee for such copies and further provided that each copy contains this Copyright Notice, whether distributed in print or electronically.


Table of Contents

I. Spring 框架概述
1. Getting Started With Spring 2. Introduction to Spring Framework
2.1. Dependency Injection and Inversion of Control 2.2. Modules
2.2.1. Core Container 2.2.2. AOP and Instrumentation 2.2.3. Messaging 2.2.4. Data Access/Integration 2.2.5. Web 2.2.6. Test
2.3. Usage scenarios
2.3.1. Dependency Management and Naming Conventions
Spring Dependencies and Depending on Spring Maven Dependency Management Maven "Bill Of Materials" Dependency Gradle Dependency Management Ivy Dependency Management Distribution Zip Files
2.3.2. Logging
Not Using Commons Logging Using SLF4J Using Log4J
II. Spring 4.x的新功能
3. Spring 4.0增强和新功能
3.1. 改进的入门体验 3.2. 移除过时的包和方法 3.3. Java 8 (以及6和7) 3.4. Java EE 6和7 3.5. Groovy DSL定义Bean 3.6. 核心容器改进 3.7. 常规Web改进 3.8. WebSocket、SockJS和STOMP消息 3.9. 测试改进
4. Spring 4.1增强和新功能
4.1. JMS改进 4.2. Caching(缓存)改进 4.3. Web改进 4.4. WebSocket STOMP消息改进 4.5. 测试改进
III. 核心技术
5. IoC 容器
5.1. Spring IoC容器和Bean概述 5.2. 容器概述
5.2.1. 配置元数据 5.2.2. 实例化容器
编写基于XML的配置元数据
5.2.3. 使用容器
5.3. Bean overview
5.3.1. Naming beans
Aliasing a bean outside the bean definition
5.3.2. Instantiating beans
Instantiation with a constructor Instantiation with a static factory method Instantiation using an instance factory method
5.4. 依赖
5.4.1. 依赖注入
构造器注入 Setter注入 依赖解决步骤 一些依赖注入的例子
5.4.2. 依赖配置详解
直接变量 (基本类型, String类型等) 引用其他bean(协作者) 内部bean 集合 Null和空字符串 XML使用p命名空间简化 XML shortcut with the c-namespace 组合属性名称
5.4.3. 使用 depends-on 5.4.4. 延迟初始化bean 5.4.5. 自动装配协作者
自动装配的局限性和缺点 将bean排除在自动装配之外
5.4.6. 方法注入
Lookup 方法注入 自定义方法的替代方案
5.5. Bean scopes
5.5.1. The singleton scope 5.5.2. The prototype scope 5.5.3. Singleton beans with prototype-bean dependencies 5.5.4. Request, session, and global session scopes
Initial web configuration Request scope Session scope Global session scope Application scope Scoped beans as dependencies
5.5.5. Custom scopes
Creating a custom scope Using a custom scope
5.6. Customizing the nature of a bean
5.6.1. Lifecycle callbacks
Initialization callbacks Destruction callbacks Default initialization and destroy methods Combining lifecycle mechanisms Startup and shutdown callbacks Shutting down the Spring IoC container gracefully in non-web applications
5.6.2. ApplicationContextAware and BeanNameAware 5.6.3. Other Aware interfaces
5.7. Bean definition inheritance 5.8. Container Extension Points
5.8.1. Customizing beans using a BeanPostProcessor
Example: Hello World, BeanPostProcessor-style Example: The RequiredAnnotationBeanPostProcessor
5.8.2. Customizing configuration metadata with a BeanFactoryPostProcessor
Example: the Class name substitution PropertyPlaceholderConfigurer Example: the PropertyOverrideConfigurer
5.8.3. Customizing instantiation logic with a FactoryBean
5.9. Annotation-based container configuration
5.9.1. @Required 5.9.2. @Autowired 5.9.3. Fine-tuning annotation-based autowiring with qualifiers 5.9.4. Using generics as autowiring qualifiers 5.9.5. CustomAutowireConfigurer 5.9.6. @Resource 5.9.7. @PostConstruct and @PreDestroy
5.10. Classpath scanning and managed components
5.10.1. @Component and further stereotype annotations 5.10.2. Meta-annotations 5.10.3. Automatically detecting classes and registering bean definitions 5.10.4. Using filters to customize scanning 5.10.5. Defining bean metadata within components 5.10.6. Naming autodetected components 5.10.7. Providing a scope for autodetected components 5.10.8. Providing qualifier metadata with annotations
5.11. Using JSR 330 Standard Annotations
5.11.1. Dependency Injection with @Inject and @Named 5.11.2. @Named: a standard equivalent to the @Component annotation 5.11.3. Limitations of the standard approach
5.12. Java-based container configuration
5.12.1. Basic concepts: @Bean and @Configuration 5.12.2. Instantiating the Spring container using AnnotationConfigApplicationContext
Simple construction Building the container programmatically using register(Class<?>…) Enabling component scanning with scan(String…) Support for web applications with AnnotationConfigWebApplicationContext
5.12.3. Using the @Bean annotation
Declaring a bean Receiving lifecycle callbacks Specifying bean scope Customizing bean naming Bean aliasing Bean description
5.12.4. Using the @Configuration annotation
Injecting inter-bean dependencies Lookup method injection Further information about how Java-based configuration works internally
5.12.5. Composing Java-based configurations
Using the @Import annotation Conditionally including @Configuration classes or @Beans Combining Java and XML configuration
5.13. Environment abstraction
5.13.1. Bean definition profiles
@Profile
5.13.2. XML Bean definition profiles
Enabling a profile Default profile
5.13.3. PropertySource Abstraction 5.13.4. @PropertySource 5.13.5. Placeholder resolution in statements
5.14. Registering a LoadTimeWeaver 5.15. Additional Capabilities of the ApplicationContext
5.15.1. Internationalization using MessageSource 5.15.2. Standard and Custom Events 5.15.3. Convenient access to low-level resources 5.15.4. Convenient ApplicationContext instantiation for web applications 5.15.5. Deploying a Spring ApplicationContext as a Java EE RAR file
5.16. The BeanFactory
5.16.1. BeanFactory or ApplicationContext? 5.16.2. Glue code and the evil singleton
6. Resources
6.1. 介绍 6.2. Resource 接口 6.3. 内置的 Resource 实现
6.3.1. UrlResource 6.3.2. ClassPathResource 6.3.3. FileSystemResource 6.3.4. ServletContextResource 6.3.5. InputStreamResource 6.3.6. ByteArrayResource
6.4. ResourceLoader 接口 6.5. ResourceLoaderAware 接口 6.6. 资源依赖 6.7. 应用上下文和资源路径
6.7.1. 构造应用上下文
构造 ClassPathXmlApplicationContext 实例 - 快捷方式
6.7.2. 使用通配符构造应用上下文
Ant 风格模式 classpath*: 的可移植性 通配符的补充说明
6.7.3. FileSystemResource 警告
7. 数据校验、数据绑定和类型转换
7.1. 概述 7.2. 使用Spring的Validator接口来进行数据校验 7.3. 通过错误编码得到错误信息 7.4. Bean的操作和BeanWrapper
7.4.1. Setting和getting基本及嵌套属性 7.4.2. 内嵌的属性编辑器实现
Registering additional custom PropertyEditors
7.5. Spring Type Conversion
7.5.1. Converter SPI 7.5.2. ConverterFactory 7.5.3. GenericConverter
ConditionalGenericConverter
7.5.4. ConversionService API 7.5.5. Configuring a ConversionService 7.5.6. Using a ConversionService programmatically
7.6. Spring Field Formatting
7.6.1. Formatter SPI 7.6.2. Annotation-driven Formatting
Format Annotation API
7.6.3. FormatterRegistry SPI 7.6.4. FormatterRegistrar SPI 7.6.5. Configuring Formatting in Spring MVC
7.7. Configuring a global date & time format 7.8. Spring Validation
7.8.1. Overview of the JSR-303 Bean Validation API 7.8.2. Configuring a Bean Validation Provider
Injecting a Validator Configuring Custom Constraints Spring-driven Method Validation Additional Configuration Options
7.8.3. Configuring a DataBinder 7.8.4. Spring MVC 3 Validation
Triggering @Controller Input Validation Configuring a Validator for use by Spring MVC Configuring a JSR-303/JSR-349 Validator for use by Spring MVC
8. Spring 表达式语言 (SpEL)
8.1. 介绍 8.2. 功能概述 8.3. 使用Spring的表达接口 表达式求值
8.3.1. EvaluationContext 接口
类型转换
8.3.2. 解析器配置 8.3.3. SpEL 编译
编译器限制
8.4. 定义bean的beandef表达支持
8.4.1. 基于XML的配置 8.4.2. 基于注解的配置
8.5. 语言参考
8.5.1. 文字表达式 8.5.2. Properties, Arrays, Lists, Maps, Indexers 8.5.3. 内联列表 8.5.4. 内联maps 8.5.5. array构造 8.5.6. 方法 8.5.7. 运算符
关系运算符 逻辑运算符 数学运​​算符
8.5.8. 赋值 8.5.9. 类型 8.5.10. 构造 8.5.11. 变量
该#this 和 #root变量
8.5.12. 函数 8.5.13. bean引用 8.5.14. 三元运算符(IF-THEN-ELSE) 8.5.15. Elvis操作符 8.5.16. 安全导航运算符 8.5.17. 集合选择 8.5.18. 集合投影 8.5.19. 表达模板
8.6. Classes used in the examples
9. Aspect Oriented Programming with Spring
9.1. Introduction
9.1.1. AOP concepts 9.1.2. Spring AOP capabilities and goals 9.1.3. AOP Proxies
9.2. @AspectJ support
9.2.1. Enabling @AspectJ Support
Enabling @AspectJ Support with Java configuration Enabling @AspectJ Support with XML configuration
9.2.2. Declaring an aspect 9.2.3. Declaring a pointcut
Supported Pointcut Designators Combining pointcut expressions Sharing common pointcut definitions Examples Writing good pointcuts
9.2.4. Declaring advice
Before advice After returning advice After throwing advice After (finally) advice Around advice Advice parameters Advice ordering
9.2.5. Introductions 9.2.6. Aspect instantiation models 9.2.7. Example
9.3. Schema-based AOP support
9.3.1. Declaring an aspect 9.3.2. Declaring a pointcut 9.3.3. Declaring advice
Before advice After returning advice After throwing advice After (finally) advice Around advice Advice parameters Advice ordering
9.3.4. Introductions 9.3.5. Aspect instantiation models 9.3.6. Advisors 9.3.7. Example
9.4. Choosing which AOP declaration style to use
9.4.1. Spring AOP or full AspectJ? 9.4.2. @AspectJ or XML for Spring AOP?
9.5. Mixing aspect types 9.6. Proxying mechanisms
9.6.1. Understanding AOP proxies
9.7. Programmatic creation of @AspectJ Proxies 9.8. Using AspectJ with Spring applications
9.8.1. Using AspectJ to dependency inject domain objects with Spring
Unit testing @Configurable objects Working with multiple application contexts
9.8.2. Other Spring aspects for AspectJ 9.8.3. Configuring AspectJ aspects using Spring IoC 9.8.4. Load-time weaving with AspectJ in the Spring Framework
A first example Aspects META-INF/aop.xml Required libraries (JARS) Spring configuration Environment-specific configuration
9.9. Further Resources
10. Spring AOP APIs
10.1. Introduction 10.2. Pointcut API in Spring
10.2.1. Concepts 10.2.2. Operations on pointcuts 10.2.3. AspectJ expression pointcuts 10.2.4. Convenience pointcut implementations
Static pointcuts Dynamic pointcuts
10.2.5. Pointcut superclasses 10.2.6. Custom pointcuts
10.3. Advice API in Spring
10.3.1. Advice lifecycles 10.3.2. Advice types in Spring
Interception around advice Before advice Throws advice After Returning advice Introduction advice
10.4. Advisor API in Spring 10.5. Using the ProxyFactoryBean to create AOP proxies
10.5.1. Basics 10.5.2. JavaBean properties 10.5.3. JDK- and CGLIB-based proxies 10.5.4. Proxying interfaces 10.5.5. Proxying classes 10.5.6. Using global advisors
10.6. Concise proxy definitions 10.7. Creating AOP proxies programmatically with the ProxyFactory 10.8. Manipulating advised objects 10.9. Using the "auto-proxy" facility
10.9.1. Autoproxy bean definitions
BeanNameAutoProxyCreator DefaultAdvisorAutoProxyCreator AbstractAdvisorAutoProxyCreator
10.9.2. Using metadata-driven auto-proxying
10.10. Using TargetSources
10.10.1. Hot swappable target sources 10.10.2. Pooling target sources 10.10.3. Prototype target sources 10.10.4. ThreadLocal target sources
10.11. Defining new Advice types 10.12. Further resources 10.13. Introduction to Spring Testing 10.14. Unit Testing
10.14.1. Mock Objects
Environment JNDI Servlet API Portlet API
10.14.2. Unit Testing support Classes
General utilities Spring MVC
10.15. Integration Testing
10.15.1. Overview 10.15.2. Goals of Integration Testing
Context management and caching Dependency Injection of test fixtures Transaction management Support classes for integration testing
10.15.3. JDBC Testing Support 10.15.4. Annotations
Spring Testing Annotations Standard Annotation Support Spring JUnit Testing Annotations Meta-Annotation Support for Testing
10.15.5. Spring TestContext Framework
Key abstractions TestExecutionListener configuration Context management Dependency injection of test fixtures Testing request and session scoped beans Transaction management Executing SQL scripts TestContext Framework support classes
10.15.6. Spring MVC Test Framework
Server-Side Tests Client-Side REST Tests
10.15.7. PetClinic Example
10.16. Further Resources
IV. 数据访问
11. 事务管理
11.1. Spring Framework事务管理介绍 11.2. Spring Framework的事务支持模型的优点
11.2.1. 全局事务 11.2.2. Local transactions 11.2.3. Spring Framework’s consistent programming model
11.3. Understanding the Spring Framework transaction abstraction 11.4. Synchronizing resources with transactions
11.4.1. High-level synchronization approach 11.4.2. Low-level synchronization approach 11.4.3. TransactionAwareDataSourceProxy
11.5. Declarative transaction management
11.5.1. Understanding the Spring Framework’s declarative transaction implementation 11.5.2. Example of declarative transaction implementation 11.5.3. Rolling back a declarative transaction 11.5.4. Configuring different transactional semantics for different beans 11.5.5. <tx:advice/> settings 11.5.6. Using @Transactional
@Transactional settings Multiple Transaction Managers with @Transactional Custom shortcut annotations
11.5.7. Transaction propagation
Required RequiresNew Nested
11.5.8. Advising transactional operations 11.5.9. Using @Transactional with AspectJ
11.6. Programmatic transaction management
11.6.1. Using the TransactionTemplate
Specifying transaction settings
11.6.2. Using the PlatformTransactionManager
11.7. Choosing between programmatic and declarative transaction management 11.8. Application server-specific integration
11.8.1. IBM WebSphere 11.8.2. Oracle WebLogic Server
11.9. Solutions to common problems
11.9.1. Use of the wrong transaction manager for a specific DataSource
11.10. Further Resources
12. DAO support
12.1. Introduction 12.2. Consistent exception hierarchy 12.3. Annotations used for configuring DAO or Repository classes
13. Data access with JDBC
13.1. Introduction to Spring Framework JDBC
13.1.1. Choosing an approach for JDBC database access 13.1.2. Package hierarchy
13.2. Using the JDBC core classes to control basic JDBC processing and error handling
13.2.1. JdbcTemplate
Examples of JdbcTemplate class usage JdbcTemplate best practices
13.2.2. NamedParameterJdbcTemplate 13.2.3. SQLExceptionTranslator 13.2.4. Executing statements 13.2.5. Running queries 13.2.6. Updating the database 13.2.7. Retrieving auto-generated keys
13.3. Controlling database connections
13.3.1. DataSource 13.3.2. DataSourceUtils 13.3.3. SmartDataSource 13.3.4. AbstractDataSource 13.3.5. SingleConnectionDataSource 13.3.6. DriverManagerDataSource 13.3.7. TransactionAwareDataSourceProxy 13.3.8. DataSourceTransactionManager 13.3.9. NativeJdbcExtractor
13.4. JDBC batch operations
13.4.1. Basic batch operations with the JdbcTemplate 13.4.2. Batch operations with a List of objects 13.4.3. Batch operations with multiple batches
13.5. Simplifying JDBC operations with the SimpleJdbc classes
13.5.1. Inserting data using SimpleJdbcInsert 13.5.2. Retrieving auto-generated keys using SimpleJdbcInsert 13.5.3. Specifying columns for a SimpleJdbcInsert 13.5.4. Using SqlParameterSource to provide parameter values 13.5.5. Calling a stored procedure with SimpleJdbcCall 13.5.6. Explicitly declaring parameters to use for a SimpleJdbcCall 13.5.7. How to define SqlParameters 13.5.8. Calling a stored function using SimpleJdbcCall 13.5.9. Returning ResultSet/REF Cursor from a SimpleJdbcCall
13.6. Modeling JDBC operations as Java objects
13.6.1. SqlQuery 13.6.2. MappingSqlQuery 13.6.3. SqlUpdate 13.6.4. StoredProcedure
13.7. Common problems with parameter and data value handling
13.7.1. Providing SQL type information for parameters 13.7.2. Handling BLOB and CLOB objects 13.7.3. Passing in lists of values for IN clause 13.7.4. Handling complex types for stored procedure calls
13.8. Embedded database support
13.8.1. Why use an embedded database? 13.8.2. Creating an embedded database instance using Spring XML 13.8.3. Creating an embedded database instance programmatically 13.8.4. Extending the embedded database support 13.8.5. Using HSQL 13.8.6. Using H2 13.8.7. Using Derby 13.8.8. Testing data access logic with an embedded database
13.9. Initializing a DataSource
13.9.1. Initializing a database instance using Spring XML
Initialization of Other Components that Depend on the Database
14. 对象关系映射(ORM)数据访问
14.1. 介绍 Spring 中的 ORM 14.2. 常见的 ORM 集成方面的注意事项
14.2.1. 资源和事务管理 14.2.2. 异常转化
14.3. Hibernate
14.3.1. 在 Spring 容器中设置 SessionFactory 14.3.2. 基于平常的 Hibernate 3 API 来实现 DAO 14.3.3. 声明式事务划分 14.3.4. 编程式事务划分 14.3.5. 事务管理策略 14.3.6. 比较容器管理和本地定义的资源 14.3.7. 在 Hibernate 中的虚假应用服务器告警
14.4. JDO
14.4.1. PersistenceManagerFactory 设置 14.4.2. 基于平常 JDO API 的 DAO 的实现 14.4.3. Transaction management 14.4.4. JdoDialect
14.5. JPA
14.5.1. 三种设置选项
LocalEntityManagerFactoryBean 从 JNDI 中获得 EntityManagerFactory LocalContainerEntityManagerFactoryBean 处理多个持久单元
14.5.2. 基于平常 JPA的 DAO 的实现 14.5.3. 事务管理 14.5.4. JpaDialect
15. Marshalling XML using O/X Mappers
15.1. Introduction
15.1.1. Ease of configuration 15.1.2. Consistent Interfaces 15.1.3. Consistent Exception Hierarchy
15.2. Marshaller and Unmarshaller
15.2.1. Marshaller 15.2.2. Unmarshaller 15.2.3. XmlMappingException
15.3. Using Marshaller and Unmarshaller 15.4. XML Schema-based Configuration 15.5. JAXB
15.5.1. Jaxb2Marshaller
XML Schema-based Configuration
15.6. Castor
15.6.1. CastorMarshaller 15.6.2. Mapping
XML Schema-based Configuration
15.7. XMLBeans
15.7.1. XmlBeansMarshaller
XML Schema-based Configuration
15.8. JiBX
15.8.1. JibxMarshaller
XML Schema-based Configuration
15.9. XStream
15.9.1. XStreamMarshaller
V. The Web
16. Web MVC 框架
16.1. Spring Web MVC 框架介绍
16.1.1. Spring Web MVC 的特点 16.1.2. 其他 MVC 实现的可插入性
16.2. The DispatcherServlet
16.2.1. WebApplicationContext 的专用 bean 16.2.2. 默认的 DispatcherServlet 配置 16.2.3. DispatcherServlet 处理顺序
16.3. Implementing Controllers
16.3.1. 使用 @Controller 定义控制器 16.3.2. 使用 @RequestMapping 映射请求
@Controller' 和 AOP 代理 New Support Classes for @RequestMapping methods in Spring MVC 3.1 URI 模版模式 在 URI 模版上使用正则表达式 路径模式 路径模式比较 路径模式与占位符 路径模式的后缀匹配 矩阵变量 可消费的媒体类型 可生产的媒体类型 请求参数和头字段值
16.3.3. 定义 @RequestMapping 处理方法
可支持的方法参数类型 可支持的方法返回类型 使用 @RequestParam 将请求参数绑定到方法参数 使用 @RequestBody 映射请求体 使用 @ResponseBody 映射响应体 使用 @RestController 创建 REST 控制器 使用 HttpEntity 在方法上使用 @ModelAttribute 在方法参数上使用 @ModelAttribute 使用 @SessionAttributes 将模型属性存储到 HTTP session 指定 redirect 和 flash 属性 处理 "application/x-www-form-urlencoded" 数据 使用 @CookieValue 映射 cookie 值 使用 @RequestHeader 映射请求头字段属性 方法参数和类型转换 自定义 WebDataBinder 的初始化 支持 Last-Modified 响应头,方便缓存内容 使用 @ControllerAdvice 注解增强控制器 支持 Jackson 序列化视图 支持 Jackson JSONP
16.3.4. 异步请求处理
异步请求的异常处理 拦截异步请求 一步请求处理的配置
16.3.5. 测试控制器
16.4. Handler 映射
16.4.1. 使用 HandlerInterceptor 拦截请求
16.5. 视图解析
16.5.1. 使用 ViewResolver 接口解析视图 16.5.2. 视图解析器链 16.5.3. 重定向到视图
RedirectView redirect: 前缀 forward: 前缀
16.5.4. ContentNegotiatingViewResolver
16.6. 使用 flash 属性 16.7. 构建 URI
16.7.1. 根据控制器和方法构建 URI 16.7.2. Building URIs to Controllers and methods from views
16.8. 使用本地化
16.8.1. 获得时区信息 16.8.2. AcceptHeaderLocaleResolver 16.8.3. CookieLocaleResolver 16.8.4. SessionLocaleResolver 16.8.5. LocaleChangeInterceptor
16.9. 主题的使用
16.9.1. 主题概览 16.9.2. 视图定义 16.9.3. 主题解析器
16.10. Spring’s multipart (file upload) support
16.10.1. Introduction 16.10.2. Using a MultipartResolver with Commons FileUpload 16.10.3. Using a MultipartResolver with Servlet 3.0 16.10.4. Handling a file upload in a form 16.10.5. Handling a file upload request from programmatic clients
16.11. Handling exceptions
16.11.1. HandlerExceptionResolver 16.11.2. @ExceptionHandler 16.11.3. Handling Standard Spring MVC Exceptions 16.11.4. Annotating Business Exceptions With @ResponseStatus 16.11.5. Customizing the Default Servlet Container Error Page
16.12. Web Security 16.13. Convention over configuration support
16.13.1. The Controller ControllerClassNameHandlerMapping 16.13.2. The Model ModelMap (ModelAndView) 16.13.3. The View - RequestToViewNameTranslator
16.14. ETag support 16.15. Code-based Servlet container initialization 16.16. Configuring Spring MVC
16.16.1. Enabling the MVC Java Config or the MVC XML Namespace 16.16.2. Customizing the Provided Configuration 16.16.3. Interceptors 16.16.4. Content Negotiation 16.16.5. View Controllers 16.16.6. View Resolvers 16.16.7. Serving of Resources 16.16.8. Falling Back On the "Default" Servlet To Serve Resources 16.16.9. Path Matching 16.16.10. Advanced Customizations with MVC Java Config 16.16.11. Advanced Customizations with the MVC Namespace
17. View technologies
17.1. Introduction 17.2. JSP & JSTL
17.2.1. View resolvers 17.2.2. Plain-old JSPs versus JSTL 17.2.3. Additional tags facilitating development 17.2.4. Using Spring’s form tag library
Configuration The form tag The input tag The checkbox tag The checkboxes tag The radiobutton tag The radiobuttons tag The password tag The select tag The option tag The options tag The textarea tag The hidden tag The errors tag HTTP Method Conversion HTML5 Tags
17.3. Tiles
17.3.1. Dependencies 17.3.2. How to integrate Tiles
UrlBasedViewResolver ResourceBundleViewResolver SimpleSpringPreparerFactory and SpringBeanPreparerFactory
17.4. Velocity & FreeMarker
17.4.1. Dependencies 17.4.2. Context configuration 17.4.3. Creating templates 17.4.4. Advanced configuration
velocity.properties FreeMarker
17.4.5. Bind support and form handling
The bind macros Simple binding Form input generation macros HTML escaping and XHTML compliance
17.5. XSLT
17.5.1. My First Words
Bean definitions Standard MVC controller code Convert the model data to XML Defining the view properties Document transformation
17.5.2. Summary
17.6. Document views (PDF/Excel)
17.6.1. Introduction 17.6.2. Configuration and setup
Document view definitions Controller code Subclassing for Excel views Subclassing for PDF views
17.7. JasperReports
17.7.1. Dependencies 17.7.2. Configuration
Configuring the ViewResolver Configuring the Views About Report Files Using JasperReportsMultiFormatView
17.7.3. Populating the ModelAndView 17.7.4. Working with Sub-Reports
Configuring Sub-Report Files Configuring Sub-Report Data Sources
17.7.5. Configuring Exporter Parameters
17.8. Feed Views 17.9. XML Marshalling View 17.10. JSON Mapping View 17.11. XML Mapping View
18. 同其他web框架集成
18.1. 简介 18.2. 通用配置 18.3. JavaServer Faces 1.2
18.3.1. SpringBeanFacesELResolver (JSF 1.2+) 18.3.2. FacesContextUtils
18.4. Apache Struts 2.x 18.5. Tapestry 5.x 18.6. 更多资源
19. Portlet MVC Framework
19.1. Introduction
19.1.1. Controllers - The C in MVC 19.1.2. Views - The V in MVC 19.1.3. Web-scoped beans
19.2. The DispatcherPortlet 19.3. The ViewRendererServlet 19.4. Controllers
19.4.1. AbstractController and PortletContentGenerator 19.4.2. Other simple controllers 19.4.3. Command Controllers 19.4.4. PortletWrappingController
19.5. Handler mappings
19.5.1. PortletModeHandlerMapping 19.5.2. ParameterHandlerMapping 19.5.3. PortletModeParameterHandlerMapping 19.5.4. Adding HandlerInterceptors 19.5.5. HandlerInterceptorAdapter 19.5.6. ParameterMappingInterceptor
19.6. Views and resolving them 19.7. Multipart (file upload) support
19.7.1. Using the PortletMultipartResolver 19.7.2. Handling a file upload in a form
19.8. Handling exceptions 19.9. Annotation-based controller configuration
19.9.1. Setting up the dispatcher for annotation support 19.9.2. Defining a controller with @Controller 19.9.3. Mapping requests with @RequestMapping 19.9.4. Supported handler method arguments 19.9.5. Binding request parameters to method parameters with @RequestParam 19.9.6. Providing a link to data from the model with @ModelAttribute 19.9.7. Specifying attributes to store in a Session with @SessionAttributes 19.9.8. Customizing WebDataBinder initialization
Customizing data binding with @InitBinder Configuring a custom WebBindingInitializer
19.10. Portlet application deployment
20. WebSocket 支持
20.1. 介绍
20.1.1. WebSocket Fallback Options 20.1.2. 基于消息的架构 20.1.3. Sub-Protocol Support in WebSocket 20.1.4. 我应该使用websocket吗?
20.2. WebSocket API
20.2.1. 创建并配置一个WebSocketHandler 20.2.2. 自定义Websocket Handshake 20.2.3. WebSocketHandler 的装饰器 20.2.4. 部署注意事项 20.2.5. 配置WebSocket 引擎
20.3. SockJS Fallback Options
20.3.1. Overview of SockJS 20.3.2. 启用 SockJS 20.3.3. HTTP Streaming in IE 8, 9: Ajax/XHR vs IFrame 20.3.4. 心跳消息 Heartbeat Messages 20.3.5. Servlet 3 异步请求 Servlet 3 Async Requests 20.3.6. CORS Headers for SockJS 20.3.7. SockJS 客户端
20.4. STOMP Over WebSocket Messaging Architecture
20.4.1. Overview of STOMP 20.4.2. Enable STOMP over WebSocket 20.4.3. Flow of Messages 20.4.4. Annotation Message Handling 20.4.5. Sending Messages 20.4.6. Simple Broker 20.4.7. Full-Featured Broker 20.4.8. Connections To Full-Featured Broker 20.4.9. Using Dot as Separator in @MessageMapping Destinations 20.4.10. Authentication 20.4.11. User Destinations 20.4.12. Listening To ApplicationContext Events and Intercepting Messages 20.4.13. WebSocket Scope 20.4.14. Configuration and Performance 20.4.15. Runtime Monitoring 20.4.16. 测试带注解的控制器方法 Testing Annotated Controller Methods
VI. Integration
21. Remoting and web services using Spring
21.1. Introduction 21.2. Exposing services using RMI
21.2.1. Exporting the service using the RmiServiceExporter 21.2.2. Linking in the service at the client
21.3. Using Hessian or Burlap to remotely call services via HTTP
21.3.1. Wiring up the DispatcherServlet for Hessian and co. 21.3.2. Exposing your beans by using the HessianServiceExporter 21.3.3. Linking in the service on the client 21.3.4. Using Burlap 21.3.5. Applying HTTP basic authentication to a service exposed through Hessian or Burlap
21.4. Exposing services using HTTP invokers
21.4.1. Exposing the service object 21.4.2. Linking in the service at the client
21.5. Web services
21.5.1. Exposing servlet-based web services using JAX-WS 21.5.2. Exporting standalone web services using JAX-WS 21.5.3. Exporting web services using the JAX-WS RI’s Spring support 21.5.4. Accessing web services using JAX-WS
21.6. JMS
21.6.1. Server-side configuration 21.6.2. Client-side configuration
21.7. AMQP 21.8. Auto-detection is not implemented for remote interfaces 21.9. Considerations when choosing a technology 21.10. Accessing RESTful services on the Client
21.10.1. RestTemplate
Working with the URI Dealing with request and response headers Jackson JSON Views support
21.10.2. HTTP Message Conversion
StringHttpMessageConverter FormHttpMessageConverter ByteArrayHttpMessageConverter MarshallingHttpMessageConverter MappingJackson2HttpMessageConverter MappingJackson2XmlHttpMessageConverter SourceHttpMessageConverter BufferedImageHttpMessageConverter
21.10.3. Async RestTemplate
22. Enterprise JavaBeans (EJB) integration
22.1. Introduction 22.2. Accessing EJBs
22.2.1. Concepts 22.2.2. Accessing local SLSBs 22.2.3. Accessing remote SLSBs 22.2.4. Accessing EJB 2.x SLSBs versus EJB 3 SLSBs
22.3. Using Spring’s EJB implementation support classes
22.3.1. EJB 3 injection interceptor
23. JMS (Java Message Service)
23.1. Introduction 23.2. Using Spring JMS
23.2.1. JmsTemplate 23.2.2. Connections
Caching Messaging Resources SingleConnectionFactory CachingConnectionFactory
23.2.3. Destination Management 23.2.4. Message Listener Containers
SimpleMessageListenerContainer DefaultMessageListenerContainer
23.2.5. Transaction management
23.3. Sending a Message
23.3.1. Using Message Converters 23.3.2. SessionCallback and ProducerCallback
23.4. Receiving a message
23.4.1. Synchronous Reception 23.4.2. Asynchronous Reception - Message-Driven POJOs 23.4.3. the SessionAwareMessageListener interface 23.4.4. the MessageListenerAdapter 23.4.5. Processing messages within transactions
23.5. Support for JCA Message Endpoints 23.6. Annotation-driven listener endpoints
23.6.1. Enable listener endpoint annotations 23.6.2. Programmatic endpoints registration 23.6.3. Annotated endpoint method signature 23.6.4. Reply management
23.7. JMS Namespace Support
24. JMX
24.1. Introduction 24.2. Exporting your beans to JMX
24.2.1. Creating an MBeanServer 24.2.2. Reusing an existing MBeanServer 24.2.3. Lazy-initialized MBeans 24.2.4. Automatic registration of MBeans 24.2.5. Controlling the registration behavior
24.3. Controlling the management interface of your beans
24.3.1. the MBeanInfoAssembler Interface 24.3.2. Using Source-Level Metadata (Java annotations) 24.3.3. Source-Level Metadata Types 24.3.4. the AutodetectCapableMBeanInfoAssembler interface 24.3.5. Defining management interfaces using Java interfaces 24.3.6. Using MethodNameBasedMBeanInfoAssembler
24.4. Controlling the ObjectNames for your beans
24.4.1. Reading ObjectNames from Properties 24.4.2. Using the MetadataNamingStrategy 24.4.3. Configuring annotation based MBean export
24.5. JSR-160 Connectors
24.5.1. Server-side Connectors 24.5.2. Client-side Connectors 24.5.3. JMX over Burlap/Hessian/SOAP
24.6. Accessing MBeans via Proxies 24.7. Notifications
24.7.1. Registering Listeners for Notifications 24.7.2. Publishing Notifications
24.8. Further Resources
25. JCA CCI
25.1. Introduction 25.2. Configuring CCI
25.2.1. Connector configuration 25.2.2. ConnectionFactory configuration in Spring 25.2.3. Configuring CCI connections 25.2.4. Using a single CCI connection
25.3. Using Spring’s CCI access support
25.3.1. Record conversion 25.3.2. the CciTemplate 25.3.3. DAO support 25.3.4. Automatic output record generation 25.3.5. Summary 25.3.6. Using a CCI Connection and Interaction directly 25.3.7. Example for CciTemplate usage
25.4. Modeling CCI access as operation objects
25.4.1. MappingRecordOperation 25.4.2. MappingCommAreaOperation 25.4.3. Automatic output record generation 25.4.4. Summary 25.4.5. Example for MappingRecordOperation usage 25.4.6. Example for MappingCommAreaOperation usage
25.5. Transactions
26. Email
26.1. 介绍 26.2. 使用
26.2.1. MailSender和SimpleMailMessage的基础使用 26.2.2. JavaMailSender和MimeMessagePreparator的使用
26.3. 使用JavaMail的MimeMessageHelper
26.3.1. 发送附件和内嵌资源
附件 内嵌资源
26.3.2. 用模板库来创建Email内容
使用Velocity的基础例子
27. Task Execution and Scheduling
27.1. Introduction 27.2. The Spring TaskExecutor abstraction
27.2.1. TaskExecutor types 27.2.2. Using a TaskExecutor
27.3. The Spring TaskScheduler abstraction
27.3.1. the Trigger interface 27.3.2. Trigger implementations 27.3.3. TaskScheduler implementations
27.4. Annotation Support for Scheduling and Asynchronous Execution
27.4.1. Enable scheduling annotations 27.4.2. The @Scheduled Annotation 27.4.3. The @Async Annotation 27.4.4. Executor qualification with @Async 27.4.5. Exception management with @Async
27.5. The Task Namespace
27.5.1. The scheduler element 27.5.2. The executor element 27.5.3. The scheduled-tasks element
27.6. Using the Quartz Scheduler
27.6.1. Using the JobDetailFactoryBean 27.6.2. Using the MethodInvokingJobDetailFactoryBean 27.6.3. Wiring up jobs using triggers and the SchedulerFactoryBean
28. Dynamic language support
28.1. Introduction 28.2. A first example 28.3. Defining beans that are backed by dynamic languages
28.3.1. Common concepts
The <lang:language/> element Refreshable beans Inline dynamic language source files Understanding Constructor Injection in the context of dynamic-language-backed beans
28.3.2. JRuby beans 28.3.3. Groovy beans
Customizing Groovy objects via a callback
28.3.4. BeanShell beans
28.4. Scenarios
28.4.1. Scripted Spring MVC Controllers 28.4.2. Scripted Validators
28.5. Bits and bobs
28.5.1. AOP - advising scripted beans 28.5.2. Scoping
28.6. Further Resources
29. Cache Abstraction
29.1. Introduction 29.2. Understanding the cache abstraction 29.3. Declarative annotation-based caching
29.3.1. @Cacheable annotation
Default Key Generation Custom Key Generation Declaration Default Cache Resolution Custom cache resolution Conditional caching Available caching SpEL evaluation context
29.3.2. @CachePut annotation 29.3.3. @CacheEvict annotation 29.3.4. @Caching annotation 29.3.5. @CacheConfig annotation 29.3.6. Enable caching annotations 29.3.7. Using custom annotations
29.4. JCache (JSR-107) annotations
29.4.1. Features summary 29.4.2. Enabling JSR-107 support
29.5. Declarative XML-based caching 29.6. Configuring the cache storage
29.6.1. JDK ConcurrentMap-based Cache 29.6.2. EhCache-based Cache 29.6.3. Guava Cache 29.6.4. GemFire-based Cache 29.6.5. JSR-107 Cache 29.6.6. Dealing with caches without a backing store
29.7. Plugging-in different back-end caches 29.8. How can I set the TTL/TTI/Eviction policy/XXX feature?
VII. Appendices
30. Migrating to Spring Framework 4.0 31. Classic Spring Usage
31.1. Classic ORM usage
31.1.1. Hibernate
the HibernateTemplate Implementing Spring-based DAOs without callbacks
31.1.2. JDO
JdoTemplate and JdoDaoSupport
31.1.3. JPA
JpaTemplate and JpaDaoSupport
31.2. Classic Spring MVC 31.3. JMS Usage
31.3.1. JmsTemplate 31.3.2. Asynchronous Message Reception 31.3.3. Connections 31.3.4. Transaction Management
32. Classic Spring AOP Usage
32.1. Pointcut API in Spring
32.1.1. Concepts 32.1.2. Operations on pointcuts 32.1.3. AspectJ expression pointcuts 32.1.4. Convenience pointcut implementations
Static pointcuts Dynamic pointcuts
32.1.5. Pointcut superclasses 32.1.6. Custom pointcuts
32.2. Advice API in Spring
32.2.1. Advice lifecycles 32.2.2. Advice types in Spring
Interception around advice Before advice Throws advice After Returning advice Introduction advice
32.3. Advisor API in Spring 32.4. Using the ProxyFactoryBean to create AOP proxies
32.4.1. Basics 32.4.2. JavaBean properties 32.4.3. JDK- and CGLIB-based proxies 32.4.4. Proxying interfaces 32.4.5. Proxying classes 32.4.6. Using global advisors
32.5. Concise proxy definitions 32.6. Creating AOP proxies programmatically with the ProxyFactory 32.7. Manipulating advised objects 32.8. Using the "autoproxy" facility
32.8.1. Autoproxy bean definitions
BeanNameAutoProxyCreator DefaultAdvisorAutoProxyCreator AbstractAdvisorAutoProxyCreator
32.8.2. Using metadata-driven auto-proxying
32.9. Using TargetSources
32.9.1. Hot swappable target sources 32.9.2. Pooling target sources 32.9.3. Prototype target sources 32.9.4. ThreadLocal target sources
32.10. Defining new Advice types 32.11. Further resources
33. XML Schema-based configuration
33.1. Introduction 33.2. XML Schema-based configuration
33.2.1. Referencing the schemas 33.2.2. the util schema
<util:constant/> <util:property-path/> <util:properties/> <util:list/> <util:map/> <util:set/>
33.2.3. the jee schema
<jee:jndi-lookup/> (simple) <jee:jndi-lookup/> (with single JNDI environment setting) <jee:jndi-lookup/> (with multiple JNDI environment settings) <jee:jndi-lookup/> (complex) <jee:local-slsb/> (simple) <jee:local-slsb/> (complex) <jee:remote-slsb/>
33.2.4. the lang schema 33.2.5. the jms schema 33.2.6. the tx (transaction) schema 33.2.7. the aop schema 33.2.8. the context schema
<property-placeholder/> <annotation-config/> <component-scan/> <load-time-weaver/> <spring-configured/> <mbean-export/>
33.2.9. the tool schema 33.2.10. the jdbc schema 33.2.11. the cache schema 33.2.12. the beans schema
34. Extensible XML authoring
34.1. Introduction 34.2. Authoring the schema 34.3. Coding a NamespaceHandler 34.4. BeanDefinitionParser 34.5. Registering the handler and the schema
34.5.1. META-INF/spring.handlers 34.5.2. META-INF/spring.schemas
34.6. Using a custom extension in your Spring XML configuration 34.7. Meatier examples
34.7.1. Nesting custom tags within custom tags 34.7.2. Custom attributes on normal elements
34.8. Further Resources
35. spring.tld
35.1. Introduction 35.2. the bind tag 35.3. the escapeBody tag 35.4. the hasBindErrors tag 35.5. the htmlEscape tag 35.6. the message tag 35.7. the nestedPath tag 35.8. the theme tag 35.9. the transform tag 35.10. the url tag 35.11. the eval tag
36. spring-form.tld
36.1. Introduction 36.2. the checkbox tag 36.3. the checkboxes tag 36.4. the errors tag 36.5. the form tag 36.6. the hidden tag 36.7. the input tag 36.8. the label tag 36.9. the option tag 36.10. the options tag 36.11. the password tag 36.12. the radiobutton tag 36.13. the radiobuttons tag 36.14. the select tag 36.15. the textarea tag

  • 1
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
1. 简介 1.1. 概览 1.2. 使用场景 2. Spring 2.0 的新特性 2.1. 简介 2.2. 控制反转(IoC)容器 2.2.1. 更简单的XML配置 2.2.2. 新的bean作用域 2.2.3. 可扩展的XML编写 2.3. 面向切面编程(AOP) 2.3.1. 更加简单的AOP XML配置 2.3.2. 对@AspectJ 切面的支持 2.4. 中间层 2.4.1. 在XML里更为简单的声明性事务配置 2.4.2. JPA 2.4.3. 异步的JMS 2.4.4. JDBC 2.5. Web层 2.5.1. Spring MVC的表单标签库 2.5.2. Spring MVC合理的默认值 2.5.3. Portlet 框架 2.6. 其他特性 2.6.1. 动态语言支持 2.6.2. JMX 2.6 .3. 任务规划 2.6.4. 对Java 5(Tiger)的支持 2.7. 移植到Spring 2.0 2.7.1. 一些变化 2.7.1.1. Jar包 2.7.1.2. XML配置 2.7.1.3. Deprecated的类和方法 2.7.1.4. Apache OJB 2.7.1.5. iBatis 2.8. 更新的样例应用 2.9. 改进的文档 I. 核心技术 3. 控制反转容器 3.1. 简介 3.2. 容器和bean的基本原理 3.2.1. 容器 3.2.1.1. 配置元数据 3.2.2. 实例化容器 3.2.2.1. 组成基于XML配置元数据 3.2.3. 多种bean 3.2.3.1. 命名bean 3.2.3.2. 实例化bean 3.2.4. 使用容器 3.3. 依赖 3.3.1. 注入依赖 3.3.1.1. Setter注入 3.3.1.2. 构造器注入 3.3.1.3. 一些例子 3.3.2. 构造器参数的解析 3.3.2.1. 构造器参数类型匹配 3.3.2.2. 构造器参数的索引 3.3.3. bean属性及构造器参数详解 3.3.3.1. 直接量(基本类型、Strings类型等。) 3.3.3.2. 引用其它的bean(协作者) 3.3.3.3. 内部bean 3.3.3.4. 集合 3.3.3.5. Nulls 3.3.3.6. XML-based configuration metadata shortcuts 3.3.3.7. 组合属性名称 3.3.4. 使用depends-on 3.3.5. 延迟初始化bean 3.3.6. 自动装配(autowire)协作者 3.3.6.1. 设置Bean使自动装配失效 3.3.7. 依赖检查 3.3.8. 方法注入 3.3.8.1. Lookup方法注入 3.3.8.2. 自定义方法的替代方案 3.4. bean的作用域 3.4.1. Singleton作用域 3.4.2. Prototype作用域 3.4.3. 其他作用域 3.4.3.1. 初始化web配置 3.4.3.2. Request作用域 3.4.3.3. Session作用域 3.4.3.4. global session作用域 3.4.3.5. 作用域bean与依赖 3.4.4. 自定义作用域 3.5. 定制bean特性 3.5.1. Lifecycle接口 3.5.1.1. 初始化回调 3.5.1.2. 析构回调 3.5.2. 了解自己 3.5.2.1. BeanFactoryAware 3.5.2.2. BeanNameAware 3.6. bean定义的继承 3.7. 容器扩展点 3.7.1. 用BeanPostProcessor定制bean 3.7.1.1. 使用BeanPostProcessor的Hello World示例 3.7.1.2. RequiredAnnotationBeanPostProcessor示例 3.7.2. 用BeanFactoryPostProcessor定制配置元数据 3.7.2.1. PropertyPlaceholderConfigurer示例 3.7.2.2. PropertyOverrideConfigurer示例 3.7.3. 使用FactoryBean定制实例化逻辑 3.8. ApplicationContext 3.8.1. 利用MessageSource实现国际化 3.8.2. 事件 3.8.3. 底层资源的访问 3.8.4. ApplicationContext在WEB应用中的实例化 3.9. 粘合代码和可怕的singleton 3.9.1. 使用Singleton-helper类 4. 资源 4.1. 简介 4.2. Resource 接口 4.3. 内置 Resource 实现 4.3.1. UrlResource 4.3.2. ClassPathResource 4.3.3. FileSystemResource 4.3.4. ServletContextResource 4.3.5. InputStreamResource 4.3.6. ByteArrayResource 4.4. ResourceLoader 4.5. ResourceLoaderAware 接口 4.6. 把Resource作为属性来配置 4.7. Application context 和Resource 路径 4.7.1. 构造application context 4.7.1.1. 创建 ClassPathXmlApplicationContext 实例 - 简介 4.7.2. Application context构造器中资源路径的通配符 4.7.2.1. Ant风格的pattern 4.7.2.2. classpath*: 前缀 4.7.2.3. 其他关于通配符的说明 4.7.3. FileSystemResource 提示 5. 校验,数据绑定,BeanWrapper,与属性编辑器 5.1. 简介 5.2. 使用Spring的Validator接口进行校验 5.3. 从错误代码到错误信息 5.4. Bean处理和BeanWrapper 5.4.1. 设置和获取属性值以及嵌套属性 5.4.2. 内建的PropertyEditor实现 5.4.2.1. 注册用户自定义的PropertyEditor 6. 使用Spring进行面向切面编程(AOP) 6.1. 简介 6.1.1. AOP概念 6.1.2. Spring AOP的功能和目标 6.1.3. Spring的AOP代理 6.2. @AspectJ支持 6.2.1. 启用@AspectJ支持 6.2.2. 声明一个切面 6.2.3. 声明一个切入点(pointcut) 6.2.3.1. 切入点指定者的支持 6.2.3.2. 合并切入点表达式 6.2.3.3. 共享常见的切入点(pointcut)定义 6.2.3.4. 示例 6.2.4. 声明通知 6.2.4.1. 前置通知(Before advice) 6.2.4.2. 返回后通知(After returning advice) 6.2.4.3. 抛出后通知(After throwing advice) 6.2.4.4. 后通知(After (finally) advice) 6.2.4.5. 环绕通知(Around Advice) 6.2.4.6. 通知参数(Advice parameters) 6.2.4.7. 通知(Advice)顺序 6.2.5. 引入(Introductions) 6.2.6. 切面实例化模型 6.2.7. 例子 6.3. Schema-based AOP support 6.3.1. 声明一个切面 6.3.2. 声明一个切入点 6.3.3. 声明通知 6.3.3.1. 通知(Advice) 6.3.3.2. 返回后通知(After returning advice) 6.3.3.3. 抛出异常后通知(After throwing advice) 6.3.3.4. 后通知(After (finally) advice) 6.3.3.5. 通知 6.3.3.6. 通知参数 6.3.3.7. 通知顺序 6.3.4. 引入 6.3.5. 切面实例化模型 6.3.6. Advisors 6.3.7. 例子 6.4. AOP声明风格的选择 6.4.1. Spring AOP还是完全用AspectJ? 6.4.2. Spring AOP中使用@AspectJ还是XML? 6.5. 混合切面类型 6.6. 代理机制 6.7. 编程方式创建@AspectJ代理 6.8. 在Spring应用中使用AspectJ 6.8.1. 在Spring中使用AspectJ来为domain object进行依赖注入 6.8.1.1. @Configurable object的单元测试 6.8.1.2. 多application context情况下的处理 6.8.2. Spring中其他的AspectJ切面 6.8.3. 使用Spring IoC来配置AspectJ的切面 6.8.4. 在Spring应用中使用AspectJ Load-time weaving(LTW) 6.9. 其它资源 7. Spring AOP APIs 7.1. 简介 7.2. Spring中的切入点API 7.2.1. 概念 7.2.2. 切入点实施 7.2.3. AspectJ切入点表达式 7.2.4. 便利的切入点实现 7.2.4.1. 静态切入点 7.2.4.2. 动态切入点 7.2.5. 切入点的基类 7.2.6. 自定义切入点 7.3. Spring的通知API 7.3.1. 通知的生命周期 7.3.2. Spring里的通知类型 7.3.2.1. 拦截around通知 7.3.2.2. 前置通知 7.3.2.3. 异常通知 7.3.2.4. 后置通知 7.3.2.5. 引入通知 7.4. Spring里的advisor(Advisor) API 7.5. 使用ProxyFactoryBean创建AOP代理 7.5.1. 基础 7.5.2. JavaBean属性 7.5.3. 基于JDK和CGLIB的代理 7.5.4. 对接口进行代理 7.5.5. 对类进行代理 7.5.6. 使用“全局”advisor 7.6. 简化代理定义 7.7. 使用ProxyFactory通过编程创建AOP代理 7.8. 操作被通知对象 7.9. 使用“自动代理(autoproxy)”功能 7.9.1. 自动代理bean定义 7.9.1.1. BeanNameAutoProxyCreator 7.9.1.2. DefaultAdvisorAutoProxyCreator 7.9.1.3. AbstractAdvisorAutoProxyCreator 7.9.2. 使用元数据驱动的自动代理 7.10. 使用TargetSources 7.10.1. 热交换目标源 7.10.2. 池化目标源 7.10.3. 原型目标源 7.10.4. ThreadLocal目标源 7.11. 定义新的通知类型 7.12. 更多资源 8. 测试 8.1. 简介 8.2. 单元测试 8.3. 集成测试 8.3.1. Context管理和缓存 8.3.2. 测试fixture的依赖注入 8.3.3. 事务管理 8.3.4. 方便的变量 8.3.5. 示例 8.3.6. 运行集成测试 8.4. 更多资源 II. 中间层数据访问 9. 事务管理 9.1. 简介 9.2. 动机 9.3. 关键抽象 9.4. 使用资源同步的事务 9.4.1. 高层次方案 9.4.2. 低层次方案 9.4.3. TransactionAwareDataSourceProxy 9.5. 声明式事务管理 9.5.1. 理解Spring的声明式事务管理实现 9.5.2. 第一个例子 9.5.3. 回滚 9.5.4. 为不同的bean配置不同的事务语义 9.5.5. <tx:advice/> 有关的设置 9.5.6. 使用 @Transactional 9.5.6.1. @Transactional 有关的设置 9.5.7. 插入事务操作 9.5.8. 结合AspectJ使用 @Transactional 9.6. 编程式事务管理 9.6.1. 使用 TransactionTemplate 9.6.2. 使用 PlatformTransactionManager 9.7. 选择编程式事务管理还是声明式事务管理 9.8. 与特定应用服务器集成 9.8.1. BEA WebLogic 9.8.2. IBM WebSphere 9.9. 公共问题的解决方案 9.9.1. 对一个特定的 DataSource 使用错误的事务管理器 9.10. 更多的资源 10. DAO支持 10.1. 简介 10.2. 一致的异常层次 10.3. 一致的DAO支持抽象类 11. 使用JDBC进行数据访问 11.1. 简介 11.1.1. Spring JDBC包结构 11.2. 利用JDBC核心类实现JDBC的基本操作和错误处理 11.2.1. JdbcTemplate类 11.2.2. NamedParameterJdbcTemplate类 11.2.3. SimpleJdbcTemplate类 11.2.4. DataSource接口 11.2.5. SQLExceptionTranslator接口 11.2.6. 执行SQL语句 11.2.7. 执行查询 11.2.8. 更新数据库 11.3. 控制数据库连接 11.3.1. DataSourceUtils类 11.3.2. SmartDataSource接口 11.3.3. AbstractDataSource类 11.3.4. SingleConnectionDataSource类 11.3.5. DriverManagerDataSource类 11.3.6. TransactionAwareDataSourceProxy类 11.3.7. DataSourceTransactionManager类 11.4. 用Java对象来表达JDBC操作 11.4.1. SqlQuery类 11.4.2. MappingSqlQuery类 11.4.3. SqlUpdate类 11.4.4. StoredProcedure类 11.4.5. SqlFunction类 12. 使用ORM工具进行数据访问 12.1. 简介 12.2. Hibernate 12.2.1. 资源管理 12.2.2. 在Spring的application context中创建 SessionFactory 12.2.3. HibernateTemplate 12.2.4. 不使用回调的基于Spring的DAO实现 12.2.5. 基于Hibernate3的原生API实现DAO 12.2.6. 编程式的事务划分 12.2.7. 声明式的事务划分 12.2.8. 事务管理策略 12.2.9. 容器资源 vs 本地资源 12.2.10. 在应用服务器中使用Hibernate的注意点 12.3. JDO 12.3.1. 建立PersistenceManagerFactory 12.3.2. JdoTemplate和JdoDaoSupport 12.3.3. 基于原生的JDO API实现DAO 12.3.4. 事务管理 12.3.5. JdoDialect 12.4. Oracle TopLink 12.4.1. SessionFactory 抽象层 12.4.2. TopLinkTemplate 和 TopLinkDaoSupport 12.4.3. 基于原生的TopLink API的DAO实现 12.4.4. 事务管理 12.5. iBATIS SQL Maps 12.5.1. iBATIS 1.x和2.x的概览与区别 12.5.2. iBATIS SQL Maps 1.x 12.5.2.1. 创建SqlMap 12.5.2.2. 使用 SqlMapTemplate 和 SqlMapDaoSupport 12.5.3. iBATIS SQL Maps 2.x 12.5.3.1. 创建SqlMapClient 12.5.3.2. 使用 SqlMapClientTemplate 和 SqlMapClientDaoSupport 12.5.3.3. 基于原生的iBATIS API的DAO实现 12.6. JPA 12.6.1. 在Spring环境中建立JPA 12.6.1.1. LocalEntityManagerFactoryBean 12.6.1.2. LocalContainerEntityManagerFactoryBean 12.6.1.3. 处理多个持久化单元 12.6.2. JpaTemplate 和 JpaDaoSupport 12.6.3. 基于原生的JPA实现DAO 12.6.4. 异常转化 12.6.5. 事务管理 12.6.6. JpaDialect III. Web 13. Web框架 13.1. 介绍 13.1.1. 与其他web框架的集成 13.1.2. Spring Web MVC框架的特点 13.2. DispatcherServlet 13.3. 控制器 13.3.1. AbstractController 和 WebContentGenerator 13.3.2. 其它的简单控制器 13.3.3. MultiActionController 13.3.4. 命令控制器 13.4. 处理器映射(handler mapping) 13.4.1. BeanNameUrlHandlerMapping 13.4.2. SimpleUrlHandlerMapping 13.4.3. 拦截器(HandlerInterceptor) 13.5. 视图与视图解析 13.5.1. 视图解析器 13.5.2. 视图解析链 13.5.3. 重定向(Rediret)到另一个视图 13.5.3.1. RedirectView 13.5.3.2. redirect:前缀 13.5.3.3. forward:前缀 13.6. 本地化解析器 13.6.1. AcceptHeaderLocaleResolver 13.6.2. CookieLocaleResolver 13.6.3. SessionLocaleResolver 13.6.4. LocaleChangeInterceptor 13.7. 使用主题 13.7.1. 简介 13.7.2. 如何定义主题 13.7.3. 主题解析器 13.8. Spring对分段文件上传(multipart file upload)的支持 13.8.1. 介绍 13.8.2. 使用MultipartResolver 13.8.3. 在表单中处理分段文件上传 13.9. 使用Spring的表单标签库 13.9.1. 配置标签库 13.9.2. form标签 13.9.3. input标签 13.9.4. checkbox标签 13.9.5. radiobutton标签 13.9.6. password标签 13.9.7. select标签 13.9.8. option标签 13.9.9. options标签 13.9.10. textarea标签 13.9.11. hidden标签 13.9.12. errors标签 13.10. 处理异常 13.11. 惯例优先原则(convention over configuration) 13.11.1. 对控制器的支持: ControllerClassNameHandlerMapping 13.11.2. 对模型的支持:ModelMap (ModelAndView) 13.11.3. 对视图的支持: RequestToViewNameTranslator 13.12. 其它资源 14. 集成视图技术 14.1. 简介 14.2. JSP和JSTL 14.2.1. 视图解析器 14.2.2. 'Plain-old' JSPs versus JSTL 'Plain-old' JSP与JSTL 14.2.3. 帮助简化开发的额外的标签 14.3. Tiles 14.3.1. 需要的资源 14.3.2. 如何集成Tiles 14.3.2.1. InternalResourceViewResolver 14.3.2.2. ResourceBundleViewResolver 14.4. Velocity和FreeMarker 14.4.1. 需要的资源 14.4.2. Context 配置 14.4.3. 创建模板 14.4.4. 高级配置 14.4.4.1. velocity.properties 14.4.4.2. FreeMarker 14.4.5. 绑定支持和表单处理 14.4.5.1. 用于绑定的宏 14.4.5.2. 简单绑定 14.4.5.3. 表单输入生成宏 14.4.5.4. 重载HTML转码行为并使你的标签符合XHTML 14.5. XSLT 14.5.1. 写在段首 14.5.1.1. Bean 定义 14.5.1.2. 标准MVC控制器代码 14.5.1.3. 把模型数据转化为XML 14.5.1.4. 定义视图属性 14.5.1.5. 文档转换 14.5.2. 小结 14.6. 文档视图(PDF/Excel) 14.6.1. 简介 14.6.2. 配置和安装 14.6.2.1. 文档视图定义 14.6.2.2. Controller 代码 14.6.2.3. Excel视图子类 14.6.2.4. PDF视图子类 14.7. JasperReports 14.7.1. 依赖的资源 14.7.2. 配置 14.7.2.1. 配置ViewResolver 14.7.2.2. 配置View 14.7.2.3. 关于报表文件 14.7.2.4. 使用 JasperReportsMultiFormatView 14.7.3. 构造ModelAndView 14.7.4. 使用子报表 14.7.4.1. 配置子报表文件 14.7.4.2. 配置子报表数据源 14.7.5. 配置Exporter的参数 15. 集成其它Web框架 15.1. 简介 15.2. 通用配置 15.3. JavaServer Faces 15.3.1. DelegatingVariableResolver 15.3.2. FacesContextUtils 15.4. Struts 15.4.1. ContextLoaderPlugin 15.4.1.1. DelegatingRequestProcessor 15.4.1.2. DelegatingActionProxy 15.4.2. ActionSupport 类 15.5. Tapestry 15.5.1. 注入 Spring 托管的 beans 15.5.1.1. 将 Spring Beans 注入到 Tapestry 页面中 15.5.1.2. 组件定义文件 15.5.1.3. 添加抽象访问方法 15.5.1.4. 将 Spring Beans 注入到 Tapestry 页面中 - Tapestry 4.0+ 风格 15.6. WebWork 15.7. 更多资源 16. Portlet MVC框架 16.1. 介绍 16.1.1. 控制器 - MVC中的C 16.1.2. 视图 - MVC中的V 16.1.3. Web作用范围的Bean 16.2. DispatcherPortlet 16.3. ViewRendererServlet 16.4. 控制器 16.4.1. AbstractController和PortletContentGenerator 16.4.2. 其它简单的控制器 16.4.3. Command控制器 16.4.4. PortletWrappingController 16.5. 处理器映射 16.5.1. PortletModeHandlerMapping 16.5.2. ParameterHandlerMapping 16.5.3. PortletModeParameterHandlerMapping 16.5.4. 增加 HandlerInterceptor 16.5.5. HandlerInterceptorAdapter 16.5.6. ParameterMappingInterceptor 16.6. 视图和它们的解析 16.7. Multipart文件上传支持 16.7.1. 使用PortletMultipartResolver 16.7.2. 处理表单里的文件上传 16.8. 异常处理 16.9. Portlet应用的部署 IV. 整合 17. 使用Spring进行远程访问与Web服务 17.1. 简介 17.2. 使用RMI暴露服务 17.2.1. 使用 RmiServiceExporter 暴露服务 17.2.2. 在客户端链接服务 17.3. 使用Hessian或者Burlap通过HTTP远程调用服务 17.3.1. 为Hessian配置DispatcherServlet 17.3.2. 使用HessianServiceExporter暴露你的bean 17.3.3. 客户端连接服务 17.3.4. 使用Burlap 17.3.5. 对通过Hessian或Burlap暴露的服务使用HTTP基础认证 17.4. 使用HTTP调用器暴露服务 17.4.1. 暴露服务对象 17.4.2. 在客户端连接服务 17.5. Web服务 17.5.1. 使用JAXI-RPC暴露服务 17.5.2. 访问Web服务 17.5.3. 注册bean映射 17.5.4. 注册自己的处理方法 17.5.5. 使用XFire来暴露Web服务 17.6. 对远程接口不提供自动探测 17.7. 在选择这些技术时的一些考虑 18. Enterprise Java Bean(EJB)集成 18.1. 简介 18.2. 访问EJB 18.2.1. 概念 18.2.2. 访问本地的无状态Session Bean(SLSB) 18.2.3. 访问远程SLSB 18.3. 使用Spring提供的辅助类实现EJB组件 19. JMS 19.1. 简介 19.2. 使用Spring JMS 19.2.1. JmsTemplate 19.2.2. 连接工厂 19.2.3. (消息)目的地管理 19.2.4. 消息侦听容器 19.2.4.1. SimpleMessageListenerContainer 19.2.4.2. DefaultMessageListenerContainer 19.2.4.3. ServerSessionMessageListenerContainer 19.2.5. 事务管理 19.3. 发送一条消息 19.3.1. 使用消息转换器 19.3.2. SessionCallback 和ProducerCallback 19.4. 接收消息 19.4.1. 同步接收 19.4.2. 异步接收 - 消息驱动的POJOs 19.4.3. SessionAwareMessageListener 接口 19.4.4. MessageListenerAdapter 19.4.5. 事务中的多方参与 20. JMX 20.1. 介绍 20.2. 输出bean到JMX 20.2.1. 创建一个MBeanServer 20.2.2. 复用现有的MBeanServer 20.2.3. MBean的惰性初始化 20.2.4. MBean的自动注册 20.2.5. 控制注册行为 20.3. 控制bean的管理接口 20.3.1. MBeanInfoAssembler 接口 20.3.2. 使用源码级元数据 20.3.3. 使用JDK 5.0注解 20.3.4. 源代码级的元数据类型 20.3.5. 接口AutodetectCapableMBeanInfoAssembler 20.3.6. 用Java接口定义管理接口 20.3.7. 使用MethodNameBasedMBeanInfoAssembler 20.4. 控制bean的 ObjectName 20.4.1. 从Properties中读取ObjectName 20.4.2. 使用 MetadataNamingStrategy 20.5. JSR-160连接器 20.5.1. 服务器端连接器 20.5.2. 客户端连接器 20.5.3. 基于Burlap/Hessian/SOAP的JMX 20.6. 通过代理访问MBeans 20.7. 通知 20.7.1. 为通知注册监听器 20.7.2. 发布通知 20.8. 更多资源 21. JCA CCI 21.1. 介绍 21.2. 配置CCI 21.2.1. 连接器配置 21.2.2. 在Spring中配置ConnectionFactory 21.2.3. 配置CCI连接 21.2.4. 使用一个 CCI 单连接 21.3. 使用Spring的 CCI访问支持 21.3.1. 记录转换 21.3.2. CciTemplate 类 21.3.3. DAO支持 21.3.4. 自动输出记录生成 21.3.5. 总结 21.3.6. 直接使用一个 CCI Connection 接口和Interaction接口 21.3.7. CciTemplate 使用示例 21.4. 建模CCI访问为操作对象 21.4.1. MappingRecordOperation 21.4.2. MappingCommAreaOperation 21.4.3. 自动输出记录生成 21.4.4. 总结 21.4.5. MappingRecordOperation 使用示例 21.4.6. MappingCommAreaOperation 使用示例 21.5. 事务 22. Spring邮件抽象层 22.1. 简介 22.2. Spring邮件抽象结构 22.3. 使用Spring邮件抽象 22.3.1. 可插拔的MailSender实现 22.4. 使用 JavaMail MimeMessageHelper 22.4.1. 创建一条简单的MimeMessage,并且发送出去 22.4.2. 发送附件和嵌入式资源(inline resources) 23. Spring中的定时调度(Scheduling)和线程池(Thread Pooling) 23.1. 简介 23.2. 使用OpenSymphony Quartz 调度器 23.2.1. 使用JobDetailBean 23.2.2. 使用 MethodInvokingJobDetailFactoryBean 23.2.3. 使用triggers和SchedulerFactoryBean来包装任务 23.3. 使用JDK Timer支持类 23.3.1. 创建定制的timers 23.3.2. 使用 MethodInvokingTimerTaskFactoryBean类 23.3.3. 打包:使用TimerFactoryBean来设置任务 23.4. SpringTaskExecutor抽象 23.4.1. TaskExecutor接口 23.4.2. 何时使用TaskExecutor接口 23.4.3. TaskExecutor类型 23.4.4. 使用TaskExecutor接口 24. 动态语言支持 24.1. 介绍 24.2. 第一个例子 24.3. 定义动态语言支持的bean 24.3.1. 公共概念 24.3.1.1. <lang:language/> 元素 24.3.1.2. Refreshable bean 24.3.1.3. 内置动态语言源文件 24.3.1.4. 理解dynamic-language-backed bean context的构造器注入 24.3.2. JRuby beans 24.3.3. Groovy beans 24.3.4. BeanShell beans 24.4. 场景 24.4.1. Spring MVC控制器脚本化 24.4.2. Validator脚本化 24.5. 更多的资源 25. 注解和源代码级的元数据支持 25.1. 简介 25.2. Spring的元数据支持 25.3. 注解 25.3.1. @Required 25.3.2. Spring中的其它@Annotations 25.4. 集成Jakarta Commons Attributes 25.5. 元数据和Spring AOP自动代理 25.5.1. 基本原理 25.5.2. 声明式事务管理 25.5.3. 缓冲 25.5.4. 自定义元数据 25.6. 使用属性来减少MVC web层配置 25.7. 元数据属性的其它用法 25.8. 增加对额外元数据API的支持 A. XML Schema-based configuration A.1. Introduction A.2. XML Schema-based configuration A.2.1. Referencing the schemas A.2.2. The util schema A.2.2.1. <util:constant/> A.2.2.2. <util:property-path/> A.2.2.3. <util:properties/> A.2.2.4. <util:list/> A.2.2.5. <util:map/> A.2.2.6. <util:set/> A.2.3. The jee schema A.2.3.1. <jee:jndi-lookup/> (simple) A.2.3.2. <jee:jndi-lookup/> (with single JNDI environment setting) A.2.3.3. <jee:jndi-lookup/> (with multiple JNDI environment settings) A.2.3.4. <jee:jndi-lookup/> (complex) A.2.3.5. <jee:local-slsb/> (simple) A.2.3.6. <jee:local-slsb/> (complex) A.2.3.7. <jee:remote-slsb/> A.2.4. The lang schema A.2.5. The tx (transaction) schema A.2.6. The aop schema A.2.7. The tool schema A.2.8. The beans schema A.3. Setting up your IDE A.3.1. Setting up Eclipse A.3.2. Setting up IntelliJ IDEA A.3.3. Integration issues A.3.3.1. XML parsing errors in the Resin v.3 application server B. Extensible XML authoring B.1. Introduction B.2. Authoring the schema B.3. Coding a NamespaceHandler B.4. Coding a BeanDefinitionParser B.5. Registering the handler and the schema B.5.1. META-INF/spring.handlers B.5.2. META-INF/spring.schemas C. spring-beans-2.0.dtd D. spring.tld D.1. Introduction D.2. The bind tag D.3. The escapeBody tag D.4. The hasBindErrors tag D.5. The htmlEscape tag D.6. The message tag D.7. The nestedPath tag D.8. The theme tag D.9. The transform tag E. spring-form.tld E.1. Introduction E.2. The checkbox tag E.3. The errors tag E.4. The form tag E.5. The hidden tag E.6. The input tag E.7. The label tag E.8. The option tag E.9. The options tag E.10. The password tag E.11. The radiobutton tag E.12. The select tag E.13. The textarea tag F. Spring 2.0 开发手册中文化项目 F.1. 声明 F.2. 致谢 F.3. 参与人员及任务分配 F.4. Spring 2.0 正式版开发手册翻译说明 F.5. 项目历程 F.5.1. Spring 2.0 RC2 开发手册翻译项目 F.5.2. Spring 2.0 正式版开发手册翻译项目
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值