翻一翻spring历史版本

Spring 0.9 版本,有记录的第一个版本

Changes in version 0.9 (25.6.2003)
----------------------------------
* first public release since the version that came with the book "Expert One-on-One J2EE Design and Development"
* following various unofficial 0.8 CVS snapshots
* general tightening and polishing
* log via Commons Logging
* Log4J configuration support
* revised bean definition XML format with DTD
* support for lists, maps, and props in XML bean definitions
* support for hierarchical bean factories
* support for custom property editors
* various new out-of-the-box editors for dates, numbers, etc
* new FactoryBean interface instead of custom bean definitions
* FactoryBean-based resource definitions for JDBC DataSource etc
* revised simple DataSource implementations
* new JDBC error code exception translater
* new DataFieldMaxValueIncrementer support for JDBC
* new generic transaction management
* new JDO support: resource definition, transaction strategy, template, interceptor
* new Hibernate support: resource definition, transaction strategy, template, interceptor
* new support for remoting via Hessian and Burlap
* new AOP framework aligned with AOP Alliance
* revised EJB access classes based on AOP
* resource access from application contexts
* support for MessageSourceResolvable
* revised validation framework
* support for global validation errors
* revised web framework
* refactored form controller hierarchy
* new handler interception mechanism
* locale and theme resolution
* support for HTML escaping
* revised JSP tag implementations
* new sample application "Petclinic"
* new sample application "PagedList"
* application skeletons as configuration showcases
* MutableSortDefinition accepts now NO_CHANGE for setProperty and does nothing in this case
* (many new convenience classes and methods)
* (too many minor improvements to list)
* (lots of minor bugfixes)

https://docs.spring.io/spring/docs/1.2.9/changelog.txt



Changes in version 0.9 (25.6.2003)
----------------------------------
* first public release since the version that came with the book "Expert One-on-One J2EE Design and Development"
* following various unofficial 0.8 CVS snapshots
* general tightening and polishing
* log via Commons Logging
* Log4J configuration support
* revised bean definition XML format with DTD
* support for lists, maps, and props in XML bean definitions
* support for hierarchical bean factories
* support for custom property editors
* various new out-of-the-box editors for dates, numbers, etc
* new FactoryBean interface instead of custom bean definitions
* FactoryBean-based resource definitions for JDBC DataSource etc
* revised simple DataSource implementations
* new JDBC error code exception translater
* new DataFieldMaxValueIncrementer support for JDBC
* new generic transaction management
* new JDO support: resource definition, transaction strategy, template, interceptor
* new Hibernate support: resource definition, transaction strategy, template, interceptor
* new support for remoting via Hessian and Burlap
* new AOP framework aligned with AOP Alliance
* revised EJB access classes based on AOP
* resource access from application contexts
* support for MessageSourceResolvable
* revised validation framework
* support for global validation errors
* revised web framework
* refactored form controller hierarchy
* new handler interception mechanism
* locale and theme resolution
* support for HTML escaping
* revised JSP tag implementations
* new sample application "Petclinic"
* new sample application "PagedList"
* application skeletons as configuration showcases
* MutableSortDefinition accepts now NO_CHANGE for setProperty and does nothing in this case
* (many new convenience classes and methods)
* (too many minor improvements to list)
* (lots of minor bugfixes)



spring 1.1.1  第一个spring 文档版本

https://docs.spring.io/spring/docs/1.1.1/reference/index.html


In early 2004, Martin Fowler asked the readers of his site: when talking about Inversion of Control: "the question, is what aspect of control are they inverting?"

Inversion Of Control 反转控制设计模式来源

https://martinfowler.com/articles/injection.html  


Spring  AOP


Aspect-Oriented Programming (AOP) complements OOP by providing another way of thinking about program structure. While OO decomposes applications into a hierarchy of objects, AOP decomposes programs into aspects or concerns.



Spring implements the AOP Alliance interception interfaces

https://sourceforge.net/projects/aopalliance/



Spring defaults to using J2SE dynamic proxies for AOP proxies. This enables any interface or set of interfaces to be proxied.


Spring can also use CGLIB proxies. This is necessary to proxy classes, rather than interfaces. CGLIB is used by default if a business object doesn't implement an interface. As it's good practice to program to interfaces rather than classes, business objects normally will implement one or more business interfaces.


The basic way to create an AOP proxy in Spring is to use the org.springframework.aop.framework.ProxyFactoryBean.



Spring also allows us to use "autoproxy" bean definitions, which can automatically proxy selected bean definitions. This is built on Spring "bean post processor" infrastructure, which enables modification of any bean definition as the container loads.


Spring  AspectJ  

 for example, if we need to add additional fields to a class, or advise fine-grained objects that aren't created by the Spring IoC container.



 Spring  Transaction Management 


Spring provides a consistent abstraction for transaction management. This abstraction is one of the most important of Spring's abstractions, and delivers the following benefits:

  • Provides a consistent programming model across different transaction APIs such as JTA, JDBC, Hibernate, iBATIS Database Layer and JDO.



 Scheduling jobs using Quartz or Timer

Spring features integration classes for scheduling support. Currently, Spring supports the Timer, built in in the JDK since 1.3 and the Quartz Scheduler



Spring 1.1.1 版本小结:

Spring1.1.1 版本是spring 第一个带有文档的发行版本. 该版本IoC模块核心以及Aop核心都已经搭建完成.

IoC模块主要通过xml来配置bean的注入.






Spring 版本1.2.6  新增ResouceLoader 模块


UrlResource

This wraps a java.net.URL, and may be used to access any object that is normally accessible via a URL, such as files, an http target, an ftp target, etc. 


ClassPathResource

This class represents a resource which should be obtained from the classpath. This uses either the thread context class loader, a given class loader, or a given class for loading resources.



FileSystemResource

This is a Resource implementation for java.io.File handles. 


ByteArrayResource

This is a Resource implementation for a given byte array. It creates ByteArrayInputStreams for the given byte array.




spring 1.2.x 版本小结:

Spring1.2.x 版本在spring1.1.x 版本上进行优化,没有太大变化.



Spring 2.0  版本.  

http://docs.spring.io/spring/docs/2.0.0/reference/new-in-2.html

 Spring 2.0 版本时间点:Spring 2.0 was announced in December 2005 at theSpring Experience conference in Florida.


Bean Scope


 Spring had IoC container level support for exactly two distinct bean scopes (singleton and prototype). Spring 2.0 improves on this by not only providing a number of additional scopes depending on the environment in which Spring is being deployed (for example, request and session scoped beans in a web environment), but also by providing 'hooks' (for want of a better word) so that Spring users can create their own scopes.


Spring AOP  @AspectJ


Spring 2.0 has a much improved AOP offering. The Spring AOP framework itself is markedly easier to configure in XML, and significantly less verbose as a result; and Spring 2.0 integrates with the AspectJ pointcut language and @AspectJ aspect declaration style.


Spring 2.0 also supports aspects defined using the @AspectJ annotations. 


Dynamic language support

Spring 2.0 now has support for beans written in languages other than Java, with the currently supported dynamic languages being JRuby, Groovy and BeanShell. 

 JMX

The Spring Framework now has support for Notifications; it is also possible to exercise declarative control over the registration behavior of MBeans with an MBeanServer.


 some of the new Java 5 support in Spring 2.0.


@Require 注解被添加到Spring 2.0中,此时,需要在xml文件中配置

RequiredAnnotationBeanPostProcessor 来拓展ioc容器.


http://docs.spring.io/spring/docs/2.0.x/reference/metadata.html#metadata-annotations-required



Spring 2.0 小结:

Spring2.0 主要优化xml配置,在JDK 5 的支持也只是提供了部分功能.





Spring2.5  版本  Spring2.5 在核心包中主要为注解配置以及注解扫描核心升级

https://docs.spring.io/spring/docs/2.5.x/reference/new-in-2.html#new-in-2-migrating-changes

Spring2.5.0 时间点: Spring 2.0, released in October 2006, and Spring 2.5, released in November 2007.


Supported JDK versions

As of Spring 2.5, support for JDK 1.3 has been removed, following Sun's official deprecation of JDK 1.3 in late 2006. If you haven't done so already, upgrade to JDK 1.4.2 or higher.

If you need to stick with an application server that only supports JDK 1.3, such as WebSphere 4.0 or 5.0, we recommend using the Spring Framework version 2.0.7/2.0.8 which still supports JDK 1.3.



Annotation-driven configuration

Spring 2.0 introduced support for various annotations for configuration purposes, such as @Transactional@Required and @PersistenceContext /@PersistenceUnit.

Spring 2.5 introduces support for a complete set of configuration annotations: @Autowired in combination with support for the JSR-250 annotations @Resource@PostConstruct and @PreDestroy .


Autodetecting components in the classpath

Spring 2.5 introduces support component scanning: autodetecting annotated components in the classpath. Typically, such component classes will be annotated with stereotypes such as @Component@Repository@Service@Controller. Depending on the application context configuration, such component classes will be autodetected and turned into Spring bean definitions, not requiring explicit configuration for each such bean.


Support for bean name pointcut element

Spring 2.5 introduces support for the bean(...) pointcut element, matching specific named beans according to Spring-defined bean names. 



Support for bean name pointcut element   为注入提供别名的功能

Spring 2.5 introduces support for the bean(...) pointcut element, matching specific named beans according to Spring-defined bean names. 



spring 2.5 also adds support for JSR-250 annotations such as @Resource@PostConstruct, and @PreDestroy. Of course, these options are only available if you are using at least Java 5 (Tiger) and thus have access to source level annotations. Use of these annotations also requires that certain BeanPostProcessors be registered within the Spring container.


Spring 2.5.x 小结:


主要在注解方面的更新.引入  来驱动注解.来避免AutowiredAnnotationBeanPostProcessor, 这些类在Ioc中的注入.


@Autowired @Resource  @PostConstruct  @PreDestroy 等大量注解被引入.


 http://docs.spring.io/spring/docs/2.5.0/reference/beans.html#beans-stereotype-annotations

 @Component and further stereotype annotations 被自动扫描


Beginning with Spring 2.0, the  @Repository  annotation was introduced as a marker for any class that fulfills the role or  stereotype  of a repository (a.k.a. Data Access Object or DAO).



Spring 2.5 introduces further stereotype annotations: @Component@Service and @Controller@Component serves as a generic stereotype for any Spring-managed component; 


Spring provides the capability of automatically detecting 'stereotyped' classes and registering corresponding BeanDefinitions with theApplicationContext.


Furthermore, the AutowiredAnnotationBeanPostProcessor and CommonAnnotationBeanPostProcessor are both included implicitly when using the component-scan element. 


Spring2.5 基于JDK5 引用注解, 是Spring 非常重要的版本变化.








Spring3.0 版本在2009年发行


https://docs.spring.io/spring/docs/3.0.0.RELEASE/reference/html/new-in-3.html

Spring 2.0, released in October 2006, and Spring 2.5, released in November 2007. It is now time for a third overhaul resulting in Spring 3.0.


The entire framework code has been revised to take advantage of Java 5 features like generics, varargs and other language improvements. We have done our best to still keep the code backwards compatible. We now have consistent use of generic Collections and Maps, consistent use of generic FactoryBeans, and also consistent resolution of bridge methods in the Spring AOP API. Generic ApplicationListeners automatically receive specific event types only. All callback interfaces such as TransactionCallback and HibernateCallback declare a generic result value now. Overall, the Spring core codebase is now freshly revised and optimized for Java 5.

Spring's TaskExecutor abstraction has been updated for close integration with Java 5's java.util.concurrent facilities. We provide first-class support for Callables and Futures now, as well as ExecutorService adapters, ThreadFactory integration, etc. This has been aligned with JSR-236 (Concurrency Utilities for Java EE 6) as far as possible. Furthermore, we provide support for asynchronous method invocations through the use of the new @Async annotation (or EJB 3.1's @Asynchronous annotation).



This is a list of new features for Spring 3.0. We will cover these features in more detail later in this section.

  • Spring Expression Language

  • IoC enhancements/Java based bean metadata

  • General-purpose type conversion system and field formatting system

  • Object to XML mapping functionality (OXM) moved from Spring Web Services project

  • Comprehensive REST support

  • @MVC additions

  • Declarative model validation

  • Early support for Java EE 6

  • Embedded database support


Java based bean metadata

Some core features from the JavaConfig project have been added to the Spring Framework now. This means that the following annotations are now directly supported:

  • @Configuration

  • @Bean

  • @DependsOn

  • @Primary

  • @Lazy

  • @Import

  • @ImportResource

  • @Value

Defining bean metadata within components

@Bean annotated methods are also supported inside Spring components. They contribute a factory bean definition to the container. 



Using meta-annotations for injection points and for bean definition methods

As of 3.2, Spring allows for @Autowired and @Value to be used as meta-annotations, e.g. to build custom injection annotations in combination with specific qualifiers. Analogously, you may build custom @Bean definition annotations for @Configuration classes, e.g. in combination with specific qualifiers, @Lazy, @Primary, etc.



XStream   JavaObject 与XML相互转换

Object to XML mapping functionality (OXM) from the Spring Web Services project has been moved to the core Spring Framework now. The functionality is found in the org.springframework.oxmpackage. 


Embed DB


The org.springframework.jdbc.datasource.embedded package provides support for embedded Java database engines. Support for HSQLH2, and Derby is provided natively.


 Defining bean metadata within components

Spring components can also contribute bean definition metadata to the container. You do this with the same @Bean annotation used to define bean metadata within @Configuration annotated classes. 



Spring's AnnotationConfigApplicationContext, new in Spring 3.0. This versatile ApplicationContext implementation is capable of accepting not only @Configuration classes as input, but also plain @Component classes and classes annotated with JSR-330 metadata.

When @Configuration classes are provided as input, the @Configuration class itself is registered as a bean definition, and all declared @Bean methods within the class are also registered as bean definitions.

When @Component and JSR-330 classes are provided, they are registered as bean definitions, and it is assumed that DI metadata such as @Autowired or @Inject are used within those classes where necessary.



As with Spring-managed components in general, the default and most common scope for autodetected components is singleton. However, sometimes you need other scopes, which Spring 2.5 provides with a new @Scope annotation. Simply provide the name of the scope within the annotation



Spring3.0  小结:  

Spring3.0 把javaconfig  引入到spring中,也是一个非常重要的版本变化.   Spring 在这里面布局已经完成.




Spring 3.1    版本提供了Enable***相关注解功能哦.


3.1. Cache Abstraction 3.2. Bean Definition Profiles 3.3. Environment Abstraction 3.4. PropertySource Abstraction



Cache 相关更新

the cache abstraction provides integration with two storages - one on top of the JDK ConcurrentMap and one for ehcache library. 


GemFire is a memory-oriented/disk-backed, elastically scalable, continuously available, active (with built-in pattern-based subscription notifications), globally replicated database and provides fully-featured edge caching.



Spring 3.1’s bean definition profiles feature is supported fully across the XML and @Configuration styles. Whichever style you prefer, we hope you’ll find profiles useful. 


Enable ****** 注解功能


 Code equivalents for Spring's XML namespaces

Code-based equivalents to popular Spring XML namespace elements , and have been developed, most in the form of @Enable annotations. These are designed for use in conjunction with Spring's @Configuration classes, which were introduced in Spring 3.0.

  • See org.springframework.context.annotation.Configuration Javadoc

  • See org.springframework.context.annotation.ComponentScan Javadoc

  • See org.springframework.transaction.annotation.EnableTransactionManagement Javadoc

  • See org.springframework.cache.annotation.EnableCaching Javadoc

  • See org.springframework.web.servlet.config.annotation.EnableWebMvc Javadoc

  • See org.springframework.scheduling.annotation.EnableScheduling Javadoc

  • See org.springframework.scheduling.annotation.EnableAsync Javadoc

  • See org.springframework.context.annotation.EnableAspectJAutoProxy Javadoc

  • See org.springframework.context.annotation.EnableLoadTimeWeaving Javadoc

  • See org.springframework.beans.factory.aspectj.EnableSpringConfigured Javadoc



Spring 3.2 版本


 Using meta-annotations for injection points and for bean definition methods

As of 3.2, Spring allows for @Autowired and @Value to be used as meta-annotations, e.g. to build custom injection annotations in combination with specific qualifiers. Analogously, you may build custom @Bean definition annotations for @Configuration classes, e.g. in combination with specific qualifiers, @Lazy, @Primary, etc.


Initial support for JCache 0.5

Spring provides a CacheManager adapter for JCache, building against the JCache 0.5 preview release. Full JCache support is coming next year, along with Java EE 7 final.






Spring 4.0版本


https://docs.spring.io/spring/docs/4.0.1.RELEASE/spring-framework-reference/html/new-in-4.0.html


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.



Spring Framework 4.0 provides support for several Java 8 features. You can make use of lambda expressions and method references with Spring’s callback interfaces. There is first-class support for java.time (JSR-310), and several existing annotations have been retrofitted as @Repeatable. You can also use Java 8’s parameter name discovery (based on the -parameters compiler flag) as an alternative to compiling your code with debug information enabled.

Spring remains compatible with older versions of Java and the JDK: concretely, Java SE 6 (specifically, a minimum level equivalent to JDK 6 update 18, as released in January 2010) and above are still fully supported. However, for newly started development projects based on Spring 4, we recommend the use of Java 7 or 8.


Spring Framework 4.0 supports the Java EE 7 level of applicable specifications now: in particular, JMS 2.0, JTA 1.2, JPA 2.1, Bean Validation 1.1, and JSR-236 Concurrency Utilities. As usual, this support focuses on individual use of those specifications, e.g. on Tomcat or in standalone environments. However, it works equally well when a Spring application is deployed to a Java EE 7 server.


Spring Core  Changes


  • Spring now treats generic types as a form of qualifier when injecting Beans. For example, if you are using a Spring Data Repository you can now easily inject a specific implementation: @Autowired Repository customerRepository.
  • If you use Spring’s meta-annotation support, you can now develop custom annotations that expose specific attributes from the source annotation.
  • Beans can now be ordered when they are autowired into lists and arrays. Both the @Order annotation and Ordered interface are supported.
  • The @Lazy annotation can now be used on injection points, as well as on @Bean definitions.
  • The @Description annotation has been introduced for developers using Java-based configuration.
  • A generalized model for conditionally filtering beans has been added via the @Conditional annotation. This is similar to @Profile support but allows for user-defined strategies to be developed programmatically.
  • CGLIB-based proxy classes no longer require a default constructor. Support is provided via the objenesis library which is repackaged inline and distributed as part of the Spring Framework. With this strategy, no constructor at all is being invoked for proxy instances anymore.
  • There is managed time zone support across the framework now, e.g. on LocaleContext.

Spring 4.1 Core  Changes



Groovy Bean Definition DSL

Beginning with Spring Framework 4.0, it is possible to define external bean configuration using a Groovy DSL. This is similar in concept to using XML bean definitions but allows for a more concise syntax. Using Groovy also allows you to easily embed bean definitions directly in your bootstrap code. 



Spring 4.3 版本为2017年最新版本


Core Container Improvements

  • Core container exceptions provide richer metadata to evaluate programmatically.
  • Java 8 default methods get detected as bean property getters/setters.
  • Lazy candidate beans are not being created in case of injecting a primary bean.
  • It is no longer necessary to specify the @Autowired annotation if the target bean only defines one constructor.
  • @Configuration classes support constructor injection.
  • Any SpEL expression used to specify the condition of an @EventListener can now refer to beans (e.g. @beanName.method()).
  • Composed annotations can now override array attributes in meta-annotations with a single element of the component type of the array. For example, theString[] path attribute of @RequestMapping can be overridden with String path in a composed annotation.
  • @PersistenceContext/@PersistenceUnit selects a primary EntityManagerFactory bean if declared as such.
  • @Scheduled and @Schedules may now be used as meta-annotations to create custom composed annotations with attribute overrides.
  • @Scheduled is properly supported on beans of any scope.



















Changes in version 0.9 (25.6.2003)
----------------------------------
* first public release since the version that came with the book "Expert One-on-One J2EE Design and Development"
* following various unofficial 0.8 CVS snapshots
* general tightening and polishing
* log via Commons Logging
* Log4J configuration support
* revised bean definition XML format with DTD
* support for lists, maps, and props in XML bean definitions
* support for hierarchical bean factories
* support for custom property editors
* various new out-of-the-box editors for dates, numbers, etc
* new FactoryBean interface instead of custom bean definitions
* FactoryBean-based resource definitions for JDBC DataSource etc
* revised simple DataSource implementations
* new JDBC error code exception translater
* new DataFieldMaxValueIncrementer support for JDBC
* new generic transaction management
* new JDO support: resource definition, transaction strategy, template, interceptor
* new Hibernate support: resource definition, transaction strategy, template, interceptor
* new support for remoting via Hessian and Burlap
* new AOP framework aligned with AOP Alliance
* revised EJB access classes based on AOP
* resource access from application contexts
* support for MessageSourceResolvable
* revised validation framework
* support for global validation errors
* revised web framework
* refactored form controller hierarchy
* new handler interception mechanism
* locale and theme resolution
* support for HTML escaping
* revised JSP tag implementations
* new sample application "Petclinic"
* new sample application "PagedList"
* application skeletons as configuration showcases
* MutableSortDefinition accepts now NO_CHANGE for setProperty and does nothing in this case
* (many new convenience classes and methods)
* (too many minor improvements to list)
* (lots of minor bugfixes)

你可能感兴趣的:(SpringBoot)