New features of the official SPRING5 document (4,3)

Source: Internet
Author: User
Tags wrapper

New features of the official SPRING5 document

Original link Translator: Supriseli

New features of the spring framework

This chapter mainly provides new features and changes to the spring framework.

upgrades to the new version of the framework can be consulted. Spring git.

Table of Contents

New features of Spring 5.x framework

New features of Spring 4.x framework

New features of Spring 3.x framework

New features of Spring FrameWork 5.0

JDK 8+ and Java ee7+ versions above

    • The code for the entire framework is based on JAVA8
    • Improve readability by using features such as generics
    • Improved direct code support for JAVA8
    • Run-time compatible JDK9
    • Java EE 7API requires spring-related module support
    • Run-time compatible Java EE8 API
    • Canceled packages, classes, and methods
    • Package beans.factory.access
    • Package Dbc.support.nativejdbc
    • Removed package Mock.staicmock from Spring-aspects module, not annotationdrivenstaticentitymockingcontrol support
    • Many of the non-recommended classes and methods are removed in the code base

Core Features

Enhancements to JDK8:

    • Provides getfile or isfile defensive abstraction when accessing resuouce
    • Effective method parameter access based on Java 8 reflection enhancement
    • Added support for declaring the default method in the spring core interface consistent use of JDK7 charset and Standardcharsets enhancements
    • Compatible with JDK9
    • The Spring 5.0 framework comes with a common log wrapper
    • Continuous instantiation of Via constructor (exception handling modified)
    • The Spring 5.0 framework comes with a common log wrapper
    • SPRING-JCL replaces the common log and still supports overridable
    • Auto Detect log4j 2.x, SLF4J, JUL (java.util.Logging) instead of other support
    • Provides getfile or isfile defensive abstraction when accessing resuouce
    • NIO-based Readablechannel also offers this new feature

Core container

    • Supports candidate component indexes (also supports environment variable scanning)
    • Support @nullable Annotations
    • Functional Style Genericapplicationcontext/annotationconfigapplicationcontext
    • Basic Support Bean API registration
    • Provides things, caches, asynchronous annotation detection when using cglib dynamic proxies at the interface level
    • XML Configuration Scope streaming
    • Spring WEBMVC
    • Full Servlet 3.1 Signature support in spring-provied filter implementation
    • Support for Servlet4.0 pushbuilder parameters in the Spring MVC controller method
    • Data binding for multiple immutable objects (kotlin/lombok/@ConstructorPorties)
    • Support jackson2.9
    • Support for JSON binding API
    • Support PROTOBUF3
    • Supports Reactor3.1 flux and mono

Springwebflux

    • The new Spring-webflux module, a reactive-based SPRING-WEBMVC, is fully asynchronous, non-blocking, designed to use the Enent-loop execution model and the traditional thread pool model.
    • Reactive description in Spring-core such as encoding and decoding
    • Spring-core related infrastructure, such as encode and decoder, can be used to encode and decode data streams; DataBuffer can use Java bytebuffer or Netty bytebuf; Reactiveadapterregistry can provide transport layer support for related libraries.
    • Included in the Spring-web package are Httpmessagereade and httpmessagewrite.

Improvements in testing

    • Completed on the JUnit 5 ' s Juptier Programming and expansion module in the Spring TestContext framework
    • Springextension: An implementation of JUnit's many extensible APIs that provides support for the existing Spring TestContext framework, using @extendwith (Springextension.class) the annotation reference.
    • @SpringJunitConfig: A composite annotation
    • @ExtendWith (Springextension.class) from JUnit Jupit
    • @ContextConfiguration from srping TestContext frame
    • @DisabledIf If you provide an expression or placeholder for the property value True, signal: The test class or test method of the annotation is disabled
    • Support for parallel testing in the Spring TestContext framework
    • The detailed view of the test section is supported by Springrunner in the Sring TestContext framework to support TESTNG, JUNIT5, new execution before and after test callbacks.
    • The Testexecutionlistener API and Testcontextmanager new Beforetestexecution () and Aftertestexecution () callbacks. Mockhttpservletrequest added the Getcontentasbytearray () and getcontentasstring () methods to access the request body
    • If the character encoding is set as a mock request, the Redirectedurl () and Forwardedurl () methods of the spring MVC test can be printed in the print () and log () methods to support the variable expression URL template.
    • The Xmlunit has been upgraded to version 2.3.

original articles, reproduced please specify: reproduced from the Concurrent programming network –ifeve.com This article link address: "SPRING5 Official document" new features

Spring5 Official documents new features (4,3)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.