您的位置:首页 > 编程语言 > Java开发

spring4.0.3 新特性

2014-04-25 21:51 225 查看
Examples of how you, as an application developer, can use the Spring platform advantage:

Make a Java method execute in a database transaction
without having to deal with transaction APIs.
Make a local Java method a remote procedure without
having to deal with remote APIs.
Make a local Java method a management operation
without having to deal with JMX APIs.
Make a local Java method a message handler
without having to deal with JMS APIs.

2.1 Dependency Injection and Inversion of Control

        Although the Java platform provides a wealth of application development functionality, it lacks the means to organize the basic building blocks into acoherent whole, leaving
that task to architects and developers. True, you can usedesign patterns such as Factory, Abstract
Factory, Builder, Decorator, and Service Locator
 to
compose the various classes and object instances that make up an application. However, these patterns are simply that: best practices given a name, with a description of what the pattern does, where to apply it, the problems it addresses, and so forth. Patterns
are formalized best practices that you must implement yourself in your application.
       The Spring Framework Inversion of Control (IoC)
component addresses this concern by providing a formalized means of composing disparate components into a fully working application ready for use.
 


2.2 Modules

The Spring Framework consists of features organized into about 20 modules. These modules are grouped into Core Container, Data Access/Integration, Web, AOP (Aspect Oriented Programming), Instrumentation, and Test, as shown in the following diagram.



 


3. New Features and Enhancements in Spring Framework 4.0

The Spring Framework was first released in 2004; since then there have been significant major revisions: Spring 2.0 provided XML namespaces and AspectJ support; Spring 2.5 embraced annotation-driven configuration; Spring 3.0 introduced a strong
Java 5+ foundation across the framework codebase, and features such as the Java-based
@Configuration
 model.

Version 4.0 is the latest major release of the Spring Framework and
the first to fully support Java 8 features
. You can still use Spring with older versions of Java, however, the minimum requirement has now been raised to Java SE 6. We have also taken the opportunity of a major release
to remove many deprecated classes and methods.

 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: