| |
| spring:spring-framework:release:5.0:en [2024/02/05 00:15] – 만듦 writer | spring:spring-framework:release:5.0:en [2024/02/05 03:38] (현재) – writer |
|---|
| * Defensive use of reflection against core JDK classes. | * Defensive use of reflection against core JDK classes. |
| * Non-null API declaration at the package level: | * Non-null API declaration at the package level: |
| * Nullable arguments, fields and return values explicitly annotated with ''@Nullable''. | * Nullable arguments, fields and return values explicitly annotated with ''<color darkorange>@Nullable</color>''. |
| * Primarily for use with IntelliJ IDEA and Kotlin, but also Eclipse and FindBugs. | * Primarily for use with IntelliJ IDEA and Kotlin, but also Eclipse and FindBugs. |
| * Some Spring APIs are not tolerating null values anymore (e.g. in ''StringUtils''). | * Some Spring APIs are not tolerating null values anymore (e.g. in ''StringUtils''). |
| === Core Container === | === Core Container === |
| |
| * Support for any ''@Nullable'' annotations as indicators for optional injection points. | * Support for any ''<color darkorange>@Nullable</color>'' annotations as indicators for optional injection points. |
| * Functional style on ''GenericApplicationContext''/''AnnotationConfigApplicationContext'' | * Functional style on ''GenericApplicationContext''/''AnnotationConfigApplicationContext'' |
| * ''Supplier''\-based bean registration API with bean definition customizer callbacks. | * ''Supplier''\-based bean registration API with bean definition customizer callbacks. |
| * Unified support for common media types through ''MediaTypeFactory'' delegate. | * Unified support for common media types through ''MediaTypeFactory'' delegate. |
| * Superseding use of the Java Activation Framework. | * Superseding use of the Java Activation Framework. |
| * Data binding with immutable objects (Kotlin / Lombok / ''@ConstructorProperties'') | * Data binding with immutable objects (Kotlin / Lombok / ''<color darkorange>@ConstructorProperties</color>'') |
| * Support for the JSON Binding API (with Eclipse Yasson or Apache Johnzon as an alternative to Jackson and GSON). | * Support for the JSON Binding API (with Eclipse Yasson or Apache Johnzon as an alternative to Jackson and GSON). |
| * Support for Jackson 2.9. | * Support for Jackson 2.9. |
| * New ''ParsingPathMatcher'' alternative to ''AntPathMatcher'' with more efficient parsing and [[https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/util/pattern/PathPattern.html|extended syntax]]. | * New ''ParsingPathMatcher'' alternative to ''AntPathMatcher'' with more efficient parsing and [[https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/util/pattern/PathPattern.html|extended syntax]]. |
| * `@ExceptionHandler` methods allow ''RedirectAttributes'' arguments (and therefore flash attributes). | * `@ExceptionHandler` methods allow ''RedirectAttributes'' arguments (and therefore flash attributes). |
| * Support for ''ResponseStatusException'' as a programmatic alternative to ''@ResponseStatus''. | * Support for ''ResponseStatusException'' as a programmatic alternative to ''<color darkorange>@ResponseStatus</color>''. |
| * Support script engines that do not implement ''Invocable'' via direct rendering of the script provided using ''ScriptEngine#eval(String, Bindings)'', and also i18n and nested templates in ''ScriptTemplateView'' via the new ''RenderingContext'' parameter. | * Support script engines that do not implement ''Invocable'' via direct rendering of the script provided using ''ScriptEngine#eval(String, Bindings)'', and also i18n and nested templates in ''ScriptTemplateView'' via the new ''RenderingContext'' parameter. |
| * Spring's FreeMarker macros (''spring.ftl'') use HTML output formatting now (requiring FreeMarker 2.3.24+). | * Spring's FreeMarker macros (''spring.ftl'') use HTML output formatting now (requiring FreeMarker 2.3.24+). |
| * Reactive infrastructure in ''spring-core'' such as ''Encoder'' and ''Decoder'' for encoding and decoding streams of Objects; ''DataBuffer'' abstraction, e.g. for using Java ''ByteBuffer'' or Netty ''ByteBuf''; ''ReactiveAdapterRegistry'' for transparent support of reactive libraries in controller method signatures. | * Reactive infrastructure in ''spring-core'' such as ''Encoder'' and ''Decoder'' for encoding and decoding streams of Objects; ''DataBuffer'' abstraction, e.g. for using Java ''ByteBuffer'' or Netty ''ByteBuf''; ''ReactiveAdapterRegistry'' for transparent support of reactive libraries in controller method signatures. |
| * Reactive infrastructure in ''spring-web'' including ''HttpMessageReader'' and ''HttpMessageWriter'' that build on and delegate to ''Encoder'' and ''Decoder''; server ''HttpHandler'' with adapters to (non-blocking) runtimes such as Servlet 3.1+ containers, Netty, and Undertow; ''WebFilter'', ''WebHandler'' and other non-blocking contract alternatives to Servlet API equivalents. | * Reactive infrastructure in ''spring-web'' including ''HttpMessageReader'' and ''HttpMessageWriter'' that build on and delegate to ''Encoder'' and ''Decoder''; server ''HttpHandler'' with adapters to (non-blocking) runtimes such as Servlet 3.1+ containers, Netty, and Undertow; ''WebFilter'', ''WebHandler'' and other non-blocking contract alternatives to Servlet API equivalents. |
| * ''@Controller'' style, annotation-based, programming model, similar to Spring MVC, but supported in WebFlux, running on a reactive stack, e.g. capable of supporting reactive types as controller method arguments, never blocking on I/O, respecting backpressure all the way to the HTTP socket, and running on extra, non-Servlet containers such as Netty and Undertow. | * ''<color darkorange>@Controller</color>'' style, annotation-based, programming model, similar to Spring MVC, but supported in WebFlux, running on a reactive stack, e.g. capable of supporting reactive types as controller method arguments, never blocking on I/O, respecting backpressure all the way to the HTTP socket, and running on extra, non-Servlet containers such as Netty and Undertow. |
| * New [[https://docs.spring.io/spring/docs/current/spring-framework-reference/web-reactive.html#webflux-fn|functional programming model]] ("WebFlux.fn") as an alternative to the ''@Controller'', annotation-based, programming model -- minimal and transparent with an endpoint routing API, running on the same reactive stack and WebFlux infrastructure. | * New [[https://docs.spring.io/spring/docs/current/spring-framework-reference/web-reactive.html#webflux-fn|functional programming model]] ("WebFlux.fn") as an alternative to the ''<color darkorange>@Controller</color>'', annotation-based, programming model -- minimal and transparent with an endpoint routing API, running on the same reactive stack and WebFlux infrastructure. |
| * New ''WebClient'' with a functional and reactive API for HTTP calls, comparable to the ''RestTemplate'' but through a fluent API and also excelling in non-blocking and streaming scenarios based on WebFlux infrastructure; in 5.0 the ''AsyncRestTemplate'' is deprecated in favor of the ''WebClient''. | * New ''WebClient'' with a functional and reactive API for HTTP calls, comparable to the ''RestTemplate'' but through a fluent API and also excelling in non-blocking and streaming scenarios based on WebFlux infrastructure; in 5.0 the ''AsyncRestTemplate'' is deprecated in favor of the ''WebClient''. |
| |
| * Functional routing Kotlin DSL for WebFlux. | * Functional routing Kotlin DSL for WebFlux. |
| * Leveraging Kotlin reified type parameters to avoid specifying explicitly the ''Class'' to use for serialization/deserialization in various APIs like ''RestTemplate'' or WebFlux APIs. | * Leveraging Kotlin reified type parameters to avoid specifying explicitly the ''Class'' to use for serialization/deserialization in various APIs like ''RestTemplate'' or WebFlux APIs. |
| * Kotlin null-safety support for ''@Autowired''/''@Inject'' and ''@RequestParam''/''@RequestHeader''/etc annotations in order to determine if an injection point or handler method parameter is required or not. | * Kotlin null-safety support for ''<color darkorange>@Autowired''/''@Inject'' and ''@RequestParam''/''@RequestHeader</color>''/etc annotations in order to determine if an injection point or handler method parameter is required or not. |
| * Kotlin script support in ''ScriptTemplateView'' for both Spring MVC and Spring WebFlux. | * Kotlin script support in ''ScriptTemplateView'' for both Spring MVC and Spring WebFlux. |
| * Array-like setters added to ''Model'', ''ModelMap'' and ''Environment''. | * Array-like setters added to ''Model'', ''ModelMap'' and ''Environment''. |
| |
| * Complete support for [[https://junit.org/junit5/|JUnit 5]]'s _Jupiter_ programming and extension models in the Spring TestContext Framework. | * Complete support for [[https://junit.org/junit5/|JUnit 5]]'s _Jupiter_ programming and extension models in the Spring TestContext Framework. |
| * [[https://docs.spring.io/spring/docs/current/spring-framework-reference/testing.html#testcontext-junit-jupiter-extension|SpringExtension]]: an implementation of multiple extension APIs from JUnit Jupiter that provides full support for the existing feature set of the Spring TestContext Framework. This support is enabled via `@ExtendWith(SpringExtension.class)`. | * [[https://docs.spring.io/spring/docs/current/spring-framework-reference/testing.html#testcontext-junit-jupiter-extension|SpringExtension]]: an implementation of multiple extension APIs from JUnit Jupiter that provides full support for the existing feature set of the Spring TestContext Framework. This support is enabled via ''<color darkorange>@ExtendWith(SpringExtension.class)</color>''. |
| * [[https://docs.spring.io/spring/docs/current/spring-framework-reference/testing.html#integration-testing-annotations-junit-jupiter-springjunitconfig|@SpringJUnitConfig]]: a composed annotation that combines `@ExtendWith(SpringExtension.class)` from JUnit Jupiter with `@ContextConfiguration` from the Spring TestContext Framework. | * [[https://docs.spring.io/spring/docs/current/spring-framework-reference/testing.html#integration-testing-annotations-junit-jupiter-springjunitconfig|@SpringJUnitConfig]]: a composed annotation that combines ''<color darkorange>@ExtendWith(SpringExtension.class)</color>'' from JUnit Jupiter with ''<color darkorange>@ContextConfiguration</color>'' from the Spring TestContext Framework. |
| * [[https://docs.spring.io/spring/docs/current/spring-framework-reference/testing.html#integration-testing-annotations-junit-jupiter-springjunitwebconfig|@SpringJUnitWebConfig]]: a composed annotation that combines `@ExtendWith(SpringExtension.class)` from JUnit Jupiter with `@ContextConfiguration` and `@WebAppConfiguration` from the Spring TestContext Framework. | * [[https://docs.spring.io/spring/docs/current/spring-framework-reference/testing.html#integration-testing-annotations-junit-jupiter-springjunitwebconfig|@SpringJUnitWebConfig]]: a composed annotation that combines ''<color darkorange>@ExtendWith(SpringExtension.class)'' from JUnit Jupiter with ''@ContextConfiguration'' and ''@WebAppConfiguration</color>'' from the Spring TestContext Framework. |
| * [[https://docs.spring.io/spring/docs/current/spring-framework-reference/testing.html#integration-testing-annotations-junit-jupiter-enabledif|@EnabledIf]]: signals that the annotated test class or test method is _enabled_ if the supplied SpEL expression or property placeholder evaluates to `true`. | * [[https://docs.spring.io/spring/docs/current/spring-framework-reference/testing.html#integration-testing-annotations-junit-jupiter-enabledif|@EnabledIf]]: signals that the annotated test class or test method is _enabled_ if the supplied SpEL expression or property placeholder evaluates to ''true''. |
| * [[https://docs.spring.io/spring/docs/current/spring-framework-reference/testing.html#integration-testing-annotations-junit-jupiter-disabledif|@DisabledIf]]: signals that the annotated test class or test method is _disabled_ if the supplied SpEL expression or property placeholder evaluates to `true`. | * [[https://docs.spring.io/spring/docs/current/spring-framework-reference/testing.html#integration-testing-annotations-junit-jupiter-disabledif|@DisabledIf]]: signals that the annotated test class or test method is _disabled_ if the supplied SpEL expression or property placeholder evaluates to ''true''. |
| * Support for [[https://docs.spring.io/spring/docs/current/spring-framework-reference/testing.html#testcontext-parallel-test-execution|parallel test execution]] in the Spring TestContext Framework. | * Support for [[https://docs.spring.io/spring/docs/current/spring-framework-reference/testing.html#testcontext-parallel-test-execution|parallel test execution]] in the Spring TestContext Framework. |
| * New _before_ and _after_ test execution callbacks in the Spring TestContext Framework with support for TestNG, JUnit 5, and JUnit 4 via the `SpringRunner` (but not via JUnit 4 rules). | * New _before_ and _after_ test execution callbacks in the Spring TestContext Framework with support for TestNG, JUnit 5, and JUnit 4 via the ''SpringRunner'' (but not via JUnit 4 rules). |
| * New `beforeTestExecution()` and `afterTestExecution()` callbacks in the `TestExecutionListener` API and `TestContextManager`. | * New ''<color steelblue>beforeTestExecution</color>()'' and ''<color steelblue>afterTestExecution</color>()'' callbacks in the ''TestExecutionListener'' API and ''TestContextManager''. |
| * `MockHttpServletRequest` now has `getContentAsByteArray()` and `getContentAsString()` methods for accessing the content (i.e., request body). | * ''MockHttpServletRequest'' now has ''<color steelblue>getContentAsByteArray</color>()'' and ''<color steelblue>getContentAsString</color>()'' methods for accessing the content (i.e., request body). |
| * The `print()` and `log()` methods in Spring MVC Test now print the request body if the character encoding has been set in the mock request. | * The ''<color steelblue>print</color>()'' and ''<color steelblue>log</color>()'' methods in Spring MVC Test now print the request body if the character encoding has been set in the mock request. |
| * The `redirectedUrl()` and `forwardedUrl()` methods in Spring MVC Test now support URI templates with variable expansion. | * The ''<color steelblue>redirectedUrl</color>()'' and ''<color steelblue>forwardedUrl</color>()'' methods in Spring MVC Test now support URI templates with variable expansion. |
| * XMLUnit support upgraded to 2.3. | * XMLUnit support upgraded to 2.3. |