Spring framework, the history and source of Spring Boot and Spring IO

Overview

The Spring framework is one of the widely used frameworks in Java development, and it is an evergreen tree that is still popular in SSH. After Struts 2 was hit by security flaws, Spring is still carrying the banner of Java in these web development when RESTful and microservices are popular today.

The Spring Framework consists of a large number of modules and a series of services they provide. These include component containers for building horizontally focused business-oriented programming support, security frameworks, data access frameworks, web application frameworks, and support classes for testing components, among others. All these components are tied together by the Dependency Injection architectural pattern. Dependency Injection (IOC, also known as Inversion of Control) makes it very convenient to design and test loosely coupled software components. The current Spring framework version is 5.0.4, and the next version, 5.05, will be released soon.

Over the years, the Spring Framework has maintained a sustained and rapid growth. Basically all Java enterprise application development infrastructure will include the Spring framework. However, integrating and configuring all the required Spring components was labor-intensive. This includes setting up library dependencies in gradle and maven, then configuring the required spring beans using xml, annotations or java code.

Spring developers also realized that this was a headache and looked to automation tools to automate the work. So Sprint Boot was introduced.

Spring boot takes a custom approach to building Sprint applications. This means that for each main use case of Spring, Spring boot defines a default set of component dependencies and auto-configuration of components. Spring boot uses a series of pre-made startup items to achieve this function. For example, to build a Sprint web application, you only need to add a dependency on  spring-boot-starter-web ; to use the Sprint email library, just add a dependency on spring-boot-starter-mail . Spring boot also has some cool features such as embedding an application server (jetty or tomcat) in the application, a command line interface based on groovy and health and metrics monitoring.

Spring boot enables Java developers to quickly start a new project containing all required Spring components.

This article mainly introduces the development history of Spring framework and Spring boot.

History of the Spring Framework

starting point

In October 2002, Rod Johnson wrote a book called "Expert One-on-One J2EE Design and Development". Published by Wrox, this book provides an overview of the current state of Java enterprise application development at the time, pointing out some of the major flaws in the Java EE and EJB component frameworks. In this book, he presents a simpler solution based on plain Java classes and injecting dependencies. Here are some of the questions raised in the book:

Centralizing workflow logic into an abstract superclass is an example of Inversion of Control. Unlike the traditional approach where library code is called by class library user code, in this approach framework code in the superclass calls user code. Inversion of control is the foundation of the framework, which tends to make heavy use of the template method pattern.

In the book, he shows how to build a high-quality, scalable online seat reservation program without using EJBs. To build this program, he wrote over 30,000 lines of infrastructure code (great)! It contains a large number of reusable Java interfaces and classes, such as ApplicationContext and BeanFactory. Since Java's interfaces are the basic building blocks of dependency injection, he named the root package of these classes com.interface21. As Rhodes later explained, 21 refers to the 21st century, implying the prospect of the 21st century.

"Expert One-on-One J2EE Design and Development" became an instant hit. The free infrastructure code that accompanies the book is highly reusable, and soon some discerning developers are using it in their projects. Wrox also provides source code and errata pages for the book, as well as an online forum for problem discussions. Now, 16 years later, the book and some of the principles he presented are still guiding the building of high-quality Java web applications. The author strongly recommends that all coders who are interested in this area can make a collection for backup viewing, and leave a message to Bugs if necessary.

Birth of Spring

Shortly after the book was published, developers Juergen Hoeller and Yann Caroff persuaded Rod Johnson to create an open source infrastructure project based on the code in the book. So around February 2003 a project was created by Rod, Juergen and Yann, and Yann gave the new framework the poetic name "Spring". It means to bring a new beginning to the traditional J2EE in "winter".

Rod Johnson's book presents J2EE best practices in a very detailed, informative and practical way. From coding standards, stereotypes, bean entities, unit testing, design decisions, persistence, caching, EJB, model-2 presentation layer, views, validation techniques and performance are well-documented. The case in the book is an excellent journey to lead you to make a java project development, from the development status, constraints, risks and the best decision. It is not only a textbook, but also a knowledge base for Java development.

In June 2003, Spring 0.9 was released under the Apache 2.0 license. In March 2004 Spring version 1.0 was released. In fact, before the release of 1.0, Spring has been widely used by developers. In August 2004, Rod Johnson, Juergen Hoeller, Keith Donald and Colin Sampaleanu co-founded interface21, a company focused on Spring consulting, training and support.

Yann Caroff left the team shortly after. Rod Johnson also left the Spring team in 2012. Juergen Hoeller has been an active developer of Spring.

Rapid development of Spring

The Spring framework has grown rapidly since version 1.0 was released in 2004. Spring 2.0 was released in October 2006, and as of that time, Spring had more than 1 million downloads. Spring 2.0 has extensible XML configuration capabilities for simplifying XML configuration and also supports Java 5, additional IoC container extension points, support for dynamic languages ​​(like groovy, aop enhancements and new bean scopes).

Interface21 changed its name to SpringSource in November 2007. At the same time Spring 2.5 was released. Major new features in Spring 2.5 include support for Java 6 and Java EE 5, support for configuration annotations, support for auto-detection and classpath for compatible components, and OSGi compatible bundles.

In 2007, SpringSource received a $10 million Series A investment from benchmark capital. SpringSource raised additional capital in 2008 through a Series B investment from accel partners and benchmark. It also acquired several companies during this period (Covalent, Hyperic, G2One, etc.). In August 2009, SpringSource was acquired by VMWare for $420 million, and within weeks SpringSource acquired cloud foundry, a cloud PaaS provider. In 2015, cloud foundry was transferred to the non-profit cloud foundry foundation.

In December 2009, Spring 3.0 was released. Spring 3.0 has many important features such as module reorganization system, support for Spring Expression Language, Java-based bean configuration (JavaConfig), embedded database (such as HSQL, H2 and Derby) support, model validation and REST support, and support for Java EE 6 support.

A number of minor releases of the 3.x series were released in 2011 and 2012. In July 2012, Rod Johnson left the Spring team. In April 2013, VMware and EMC created a joint venture called Pivotal through GE investment. All Spring projects were moved to Pivotal.

In December 2013, Pivotal announced the release of Spring Framework 4.0. Spring 4.0 is a major version upgrade of the Spring framework, including full support for Java 8, higher third-party library dependencies (groovy 1.8+, ehcache 2.1+, hibernate 3.6+, etc.), Java EE 7 support, beans Defined groovy DSL, support for websockets, and generics support for injecting bean qualifiers.

A number of Spring framework 4.xx versions were released between 2014 and 2017.

The Spring 5.0 GA release was released on September 28, 2017. Spring 5.0 supports JDK 8 and Java EE 7, and is compatible with JDK9. Servlet 3.1 is fully supported, and a new module Spring WebFlux is introduced to replace the old-fashioned spring-webmvc; there is also better support for Kotlin.

History of Spring Boot

In October 2012, Mike Youngstrom created a functional requirement in Spring jira to support containerless web application architecture in the Spring framework. He recommends configuring web container services within the Spring container bootstrapped through the main method.

This need led to the development of the Spring Boot project started in early 2013. In April 2014, Spring Boot 1.0.0 was released. Since then, some small versions of Spring Boot have started to appear.

Spring Boot 1.1 (June 2014): Improved template support, gemfire support, auto-configuration for elasticsearch and apache solr.

Spring boot 1.2 (March 2015): Upgraded to servlet 3.1/tomcat 8/jetty 9 and spring 4.1 with support for banner/jms/SpringBoot Application annotations.

Spring boot 1.3 (Dec 2016): Upgraded to spring 4.2, new spring-boot-devtools, auto-configuration of caching technologies (ehcache, hazelcast, redis, guava and infinispan) and fully executable jar support.

Spring boot 1.4 (Jan 2017): Upgraded to spring 4.3, couchbase/neo4j support, startup failure analysis and RestTemplateBuilder.

Spring boot 1.5 (February 2017): Support for kafka/ldap, third-party library upgrade, drop support for CRaSH and executor log terminal to dynamically modify application log level.

The simplicity of Spring Boot enables Java developers to quickly and at scale in their projects. Spring boot is arguably one of the fastest ways to develop RESTful microservice-based web applications in Java. It is also great for docker container deployment and rapid prototyping.

At present, the latest version of Spring boot is 2.0.0, which was released on March 1, 2018. The new version features:

Based on Java 8, supports Java 9; supports Quartz scheduler; supports embedded Netty, Tomcat, Undertow and Jetty all already support HTTP/2; executor architecture refactoring, supports Spring MVC, WebFlux and Jersey; provides maximum support for reactive programming Support; Introduces support for Kotlin 1.2.x, and provides a runApplication function to start Spring Boot applications in a common way in Kotlin.

Spring IO和Spring Boot

In June 2014, Spring io 1.0.0 was released. Spring io represents the pre-defined application class libraries and dependencies (including Spring projects and third-party libraries) dependency maintenance platform, and Spring io can perfectly support Maven and Gradle. This means that if you create your project with a specific Spring IO version, you do not need to configure the version of the library you are using. Note that this includes Spring libraries and most popular third-party libraries. The Spring boot starter project is also part of Spring io. For example, if you are using spring io 1.0.0, you do not need to specify the spring boot version when adding the dependencies of the starter project. It will automatically set it to spring boot 1.1.1.RELEASE.

Conceptually spring io consists of base layer modules and execution layer domain specific runtimes (DSRs). The base layer includes the core Spring module and associated third-party dependencies, which are guaranteed not to conflict. DSRs provided by the execution layer to simplify production-ready builds, JVM-based workloads, etc. Spring boot is one of the execution layer DSRs provided by Spring IO, and another DSR is Grails.

There are two ways to build Spring applications: using spring boot and using spring io directly.

It's important to note that usually whenever a new Spring framework version is released, it's accompanied by a new Spring boot version followed by a new sprint io version.

In November 2015, Spring io 2.0.0 was released. Versions provide new modules and dependencies, including Spring Boot 1.3. In July 2016, the Spring io team decided to use an alphabetical versioning scheme. Spring IO uses city names for major versions and one letter for minor versions. Therefore, depending on the individual components used, your application may need to choose the appropriate version. A release with a new name indicates a maintenance release that you can use without affecting the code.

In September 2016, Athens, the first version of the Spring io platform with alphabetical and city names, was released. It contains sprint boot 1.4 and other 3rd party library upgrades. Since then, Athens has released several service releases (SR1, SR2, SR3 and SR4).

In March 2017, the spring io platform Brussels-SR1 was released. It uses the latest spring boot version 1.5.2.RELEASE.

The latest version is Brussels-SR7, which was released on January 31, 2018. The next version, Cairo-RC1, also provides a preliminary use version. The supported modules are as follows:

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324954036&siteId=291194637