⭐ New Features
@SendTo
does not get converter applied when returning Message [SPR-13124] #17715- Implement hashCode() for synthesized annotations [SPR-13066] #17658
- Implement equals() for synthesized annotations [SPR-13065] #17657
- Implement toString() for synthesized annotations [SPR-13064] #17656
- Introduce putIfAbsent() in AnnotationAttributes [SPR-13060] #17652
- No possible matches for invalid field access in DirectFieldAccessor [SPR-13053] #17645
- mvcUrl is always rendering scheme+host+port, that should be optional only when absolute link is needed [SPR-13045] #17637
- DataBinder should use ConversionService if PropertyEditor cannot produce required type [SPR-13042] #17634
- Ability to prefix each RestTemplate request using some kind of UriPrefixingClientHttpRequestFactory [SPR-13035] #17627
- LocaleChangeInterceptor not protected against CSRF [SPR-13032] #17624
- Document "present" terminology in AnnotationUtils [SPR-13030] #17623
- Provide access to the return type in MethodMetadata [SPR-13024] #17615
- Destroy callback cannot be disabled for AutoCloseable beans [SPR-13022] #17613
- Harmonize default converters with available editors [SPR-13020] #17611
- Avoid eager error message formatting in pre-condition checks [SPR-13007] #17599
- Introduce AopTestUtils in spring-test [SPR-13005] #17597
- Eliminate inspection of meta-annotations on Java annotations [SPR-12989] #17580
- NoHandlerFoundException message should not contain all headers [SPR-12984] #17575
- Automatically register Jackson's JDK 8 module when available [SPR-12983] #17574
- ShallowEtagHeaderFilter breaks SockJS and HTTP streaming async responses [SPR-12960] #17552
- Using StandardWebSocketClient it's not possible to customize ClientEndpointConfig before it's passed to WebSocketContainer.connectToServer method [SPR-12955] #17547
- Default RequestPostProcessor should be executed first [SPR-12945] #17538
- Autowiring against a closed ApplicationContext should consistently fail [SPR-12932] #17525
- Spring Performance Optimization, Comparing Classes [SPR-12926] #17519
- Allow for marshalling the messaging Message payload with an user defined marshaller [SPR-12912] #17511
- Configure reply type via JmsListenerContainerFactory [SPR-12911] #17510
@Configuration
enhancer does not throw proper exception in case of mismatched@Bean
method [SPR-12905] #17504- MVC should respect
@ResponseStatus
on exceptions during mapping [SPR-12903] #17502 - Revisit "ApplicationEventMulticaster not initialized" behavior for early event publication scenarios [SPR-12902] #17501
- Support expression in
@SendTo
for JMS endpoints [SPR-12899] #17498 - Improve exception message in case of incomplete Caching configuration. [SPR-12898] #17497
- ResourceHttpMessageConverter always returns "application/octet-stream" Content-Type [SPR-12894] #17493
- OkHttp implementations of ClientHttpRequestFactory / AsyncClientHttpRequestFactory [SPR-12893] #17492
- Better exception message for missing
@RequestBody
method parameter [SPR-12888] #17486 - Support 'selector' header for subscriptions with SimpleBrokerMessageHandler [SPR-12884] #17482
- Support injecting resource as Reader [SPR-12876] #17474
- Improve handling of JDK dynamic proxies in DefaultAopProxyFactory. [SPR-12870] #17468
- CookieGenerator.removeCookie doesnt support secure field [SPR-12865] #17463
- MethodValidationPostProcessor could be more open to extension [SPR-12863] #17461
- Indeterministic UnsatisfiedServletRequestParameterException#paramConditions [SPR-12854] #17452
- Provide Access to Spring WebSocket's Configured PathMatcher [SPR-12845] #17443
- add support of xlsx format to JasperReportsMultiFormatView [SPR-12843] #17441
- HttpSessionHandshakeInterceptor's getSession(request) [SPR-12840] #17438
- Introduce database-name attribute in <jdbc:embedded-database /> [SPR-12835] #17432
- Allow <jdbc:embedded-database /> to be declared as an anonymous bean [SPR-12834] #17431
- HTTP Streaming Directly to the OutputStream [SPR-12831] #17428
- HttpComponentsClientHttpRequestFactory should not depend on CloseableHttpClient [SPR-12826] #17423
- Add setAutoStartup(boolean) to AbstractJmsListenerContainerFactory [SPR-12824] #17421
- Make ReflectionUtils.doWithMethods work on Java 8 default interface methods [SPR-12822] #17419
- On CONNECT and external broker is not available, StompBrokerRelayMessageHandler should return ERROR frame [SPR-12820] #17417
- Support a customizable FieldError creation at SpringValidatorAdapter [SPR-12819] #17416
- Provide an option for trailing slash for AbstractUrlHandlerMapping like RequestMappingHandlerMapping [SPR-12818] #17415
- Support SpEL in bean class names [SPR-12817] #17414
- SubProtocolWebSocketHandler should check is session is open before adding it to its map [SPR-12812] #17409
- SpEL's ReflectiveMethodResolver should use distance computation by default [SPR-12808] #17405
@Order
annotations not consistently honored within DispatcherServlet and other parts of the framework [SPR-12806] #17403- Make initDirectFieldAccess work with array, List and Map [SPR-12805] #17402
- Support for named parameters in SimpleJdbcCall [SPR-12801] #17398
- Allow use of MvcUriComponentsBuilder independent of Servlet request lifecycle [SPR-12800] #17397
- Support for Transport connectivity check in JavaMailSender [SPR-12799] #17396
- TypeDescriptor should support arbitrary levels of meta-annotations [SPR-12793] #17390
- SpEL: reduce restrictions on compiling mathematical expressions [SPR-12789] #17386
- UrlTag mishandles foreign root context URIs [SPR-12782] #17380
- Re-allow handling empty request body [SPR-12778] #17376
- ProxyAsyncConfiguration is eagerly loaded due to AsyncAnnotationBeanPostProcessor [SPR-12761] #17358
- Support for Hibernate Validator 5.2 [SPR-12758] #17355
- FlashMap's cannot be easily serialized by means other than java serialization [SPR-12757] #17354
- ProxyFactory should not discard objenesis cache, thereby enabling efficient proxy instantiation [SPR-12755] #17352
- Support
@ControllerAdvice
registrations in the MockMvcBuilders standalone setup [SPR-12751] #17348 - Provide option in RestTemplate to encode slash in URI variables [SPR-12750] #17347
- Allowing access to scheduled tasks in the ScheduledTaskRegistrar [SPR-12748] #17345
- Allow easier use of custom RequestMappingHandlerMapping in WebMvcConfigurationSupport [SPR-12746] #17343
- MvcUriComponentsBuilder drops trailing slash from
@RequestMapping
[SPR-12742] #17339 - Allow use of
@JsonView
on@MessageMapping
methods [SPR-12741] #17338 - Collections returned from
@EventListener
methods should result in each element being published as an individual event [SPR-12733] #17330 - Customize STOMP ERROR frame [SPR-12732] #17329
- Add TimeoutException to JmsInvokerClientInterceptor [SPR-12731] #17328
- MessageConverter implementation that marshals from/to XML [SPR-12726] #17323
- All HttpMessageConverters should support StreamingHttpOutputMessage [SPR-12715] #17312
- ResolvableType.getType() should reflect the set up type correctly [SPR-12701] #17298
- Support global
@MessageExceptionHandler
[SPR-12696] #17293 - Cache aspect should also clear expression caches on shutdown [SPR-12691] #17289
- Improve extensibility of TestContext bootstrap and context caching mechanisms [SPR-12683] #17282
- Make resolveContextLoader() method in AbstractTestContextBootstrapper protected [SPR-12682] #17281
- Improve charset parsing in MockHttpServletRequest and Response [SPR-12677] #17276
- Unable to explicitly order WebRequestInterceptors via addInterceptors method [SPR-12673] #17272
- ResourceBundleMessageSource should allow for custom PropertyResourceBundle subclass [SPR-12666] #17265
- context register
@Configuration
doesn't respect@Order
[SPR-12657] #17257 - Add support for
@Lazy
on@Resource
injection points [SPR-12654] #17255 - TransactionAwareCacheDecorator method clear not synchronised with transaction [SPR-12653] #17254
- Support for java.util.Optional as a
@RequestPart
[SPR-12644] #17245 @Order
should get detected in case of proxyTargetClass=false as well [SPR-12636] #17237- Provide reusable parts of Cache implementation for others [SPR-12622] #17223
- Configuration of path mapping options for websockets via XML [SPR-12621] #17222
- task:annotation-driven does not process exception-handler with mode aspectj [SPR-12619] #17220
- Allow customizing "base" path in MvcUriComponentsBuilder (e.g. path prefix for locale) [SPR-12617] #17218
- Allow readTimeout / connectTimeout in Netty4ClientHttpRequestFactory [SPR-12612] #17213
- Document how HandlerInterceptor should differentiate an ASYNC dispatch [SPR-12608] #17209
- Provide access to the target HandlerMethod from
@ExceptionHandler
methods [SPR-12605] #17206 - Explicit failure if multiple
@BootstrapWith
annotations are used on the same test [SPR-12602] #17203 - Log warning for Isolation.READ_UNCOMMITTED with Propagation.NOT_SUPPORTED [SPR-12600] #17201
- Support CompletableFuture as alternative to DeferredResult in MVC [SPR-12597] #17198
- Support Jackson
@JsonFilter
[SPR-12586] #17187 - Merge default request config with local customizations [SPR-12583] #17184
- Flash attributes not working with spaces in query parameters [SPR-12569] #17170
- Support for apache commons-pool2 [SPR-12532] #17137
- Make BeanWrapperImpl use BeanUtils [SPR-12520] #17125
- Jackson
@JsonView
deserialization support for request bodies [SPR-12501] #17106 - Support for Undertow 1.2 / WildFly 9.0 [SPR-12469] #17075
- Support org.springframework.context.ApplicationContextInitializer usage programmatically (in Servlet 3.0+ environments) [SPR-12430] #17036
- Introduce BEFORE_METHOD and BEFORE_CLASS modes for
@DirtiesContext
[SPR-12429] #17035 - Support
@Order
on ApplicationListeners [SPR-12410] #17018 - ResourceHttpRequestHandler serves all files with must-revalidate cache header, should not do that when using a content versioning strategy [SPR-12562] #16988
- Two trailing slashes and the default servlet cannot resolve to a controller [SPR-12372] #16979
- Make use of response encoding when HTML escaping the default [SPR-12369] #16976
- Ability to use webjar with spring without specifying version info in HTML/jsp file [SPR-12323] #16928
- Custom
@RequestMapping
annotations [SPR-12296] #16901 - Support JavaScript Templating [SPR-12266] #16871
- HTTP Streaming and Server-Sent Events (SSE) [SPR-12212] #16826
- Support for JSR-354 Money & Currency [SPR-12209] #16823
- Support CompletableFuture as return value in
@MessageMapping
handlers [SPR-12207] #16821 - DirectFieldAccessor should support collections [SPR-12206] #16820
- Default conversion from and to java.util.stream.Stream [SPR-12175] #16789
- Support destination variable placeholders in
@SendTo
and@SendToUser
for STOMP endpoints [SPR-12170] #16784 - Support ListenableFuture as return value in
@MessageMapping
handlers [SPR-12168] #16782 - Add generics / parameterized type support to ListableBeanFactory getBeanNamesForType/getBeansOfType methods [SPR-12147] #16761
- ShallowEtagHeaderFilter should use a more efficiently dynamically resizing buffer than ResizableByteArrayOutputStream [SPR-12081] #16697
- Add support for transaction bound application events [SPR-12080] #16696
- Expose information about STOMP/WebSocket connections and subscriptions [SPR-12029] #16645
- StringUtils.commaDelimitedListToSet and removeDuplicateStrings should preserve original order [SPR-12003] #16619
- Improve HTTP support and update with new HTTP RFCs [SPR-11886] #16505
- Support standard javax.transaction.Transactional in AspectJ [SPR-11803] #16423
- Server-side HTTP caching improvements [SPR-11792] #16413
- SpEL should not restrict 'NEW' identificator as 'new' token for constructor [SPR-11783] #16405
- Java based config should support class-only component declarations through
@Import
[SPR-11740] #16362 - Support for Hibernate ORM 5.0 [SPR-11694] #16316
- Within Cache abstraction, log when a value was found for a key, and when not. [SPR-11654] #16277
- ApplicationListener-like annotation for consuming application events [SPR-11622] #16245
- Support user destinations with multiple WebSocket servers [SPR-11620] #16243
- Favor more locally declared composed annotations over inherited annotations [SPR-11598] #16221
- STOMP client support [SPR-11588] #16212
- Provide public methods to register and un-register handler method mappings [SPR-11541] #16166
- Document and test status quo for AnnotatedElementUtils [SPR-11514] #16139
- Introduce support for explicit annotation attribute overrides [SPR-11513] #16138
- Introduce unified support for declaring and looking up annotation attribute aliases [SPR-11512] #16137
- Heartbeat in Messaging SimpleBroker [SPR-10954] #15582
@Bean
on Java 8 default methods in interfaces [SPR-10919] #15547- Add support for http byte-range requests [SPR-10805] #15431
- TypeMismatchException for
@RequestParam
does not contain parameter name [SPR-10153] #14786 - ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForModelMethod should take into account the allowBeanDefinitionOverride settings [SPR-9682] #14316
- Beans defined by
@ComponentScan
are skipped in@Configuration
override [SPR-9567] #14201 - CORS support [SPR-9278] #13916
- Introduce support for generating unique names for embedded databases [SPR-8849] #13491
- ApplicationEvent should take generics into account when dispatching events [SPR-8201] #12850
- AnnotationTransactionAspect retains reference to closed BeanFactory [SPR-7964] #12619
- Provide a formatter registry capability local to a controller [SPR-7773] #12429
- Provide
@Rule
alternative to SpringJUnit4ClassRunner [SPR-7731] #12387 - When a bean definition is overridden, detect whether the definition has changed and log accordingly [SPR-7607] #12263
- Support for XSSFWorkbook and SXSSFWorkbook (xmlx format; POI 3.9+) [SPR-6898] #11563
- Support setting and getting static fields in ReflectionTestUtils [SPR-6792] #11458
- No way to register Formatter instances by field on DataBinder [SPR-6069] #10737
- ScriptFactory for JSR-223 [SPR-5215] #9888
🪲 Bug Fixes
- An exception is thrown when validation fails on public nested fields [SPR-13107] #17698
- SynthesizedAnnotation must be public [SPR-13057] #17649
- In SPEL projection expression, #this as the same value as #root [SPR-13055] #17647
- Wrong URL with MvcUriComponentsBuilder::fromMethodCall in case of inheritance [SPR-13033] #17625
- AntPathMatcher should throw an IllegalArgumentException if patterns cannot be combined [SPR-12998] #17590
- MvcUriComponentsBuilder does not support bridged methods [SPR-12977] #17568
- AnnotatedElementUtils fails to find type-level annotations on interfaces [SPR-12944] #17537
- AnnotationUtils does not support arbitrary levels of meta-annotations on methods [SPR-12941] #17534
- ConfigurationClassEnhancer.enhanceFactoryBean is not transparent for method calls other than getObject() [SPR-12915] #17514
- HttpClientErrorException missing response body if callback is registered [SPR-12887] #17485
- MockHttpServletRequestBuilder should not decode query string [SPR-12880] #17478
- HttpEntity controller method arguments should allow null body [SPR-12861] #17459
- Contract of
@RequestPart
(required=false) not obeyed [SPR-12860] #17458 - BeanFactoryUtils.beanNamesForTypeIncludingAncestors(factory, RepositoryFactoryInformation.class, false, false) doesn't find beans that are found in 4.1 [SPR-12846] #17444
- CompositePropertySource doesn't fulfil EnumerablePropertySource [SPR-12788] #17385
@JmsListener
cannot be a scoped proxy [SPR-12774] #17371- Favor more locally declared composed annotations over inherited annotations in the TestContext framework [SPR-12749] #17346
- AnnotatedElementUtils fails to find annotations on abstract, bridge, or interface methods [SPR-12738] #17335
- ClassCastException in ResponseBodyEmitterReturnValueHandler.supportsReturnType(…) [SPR-12693] #17291
- SpEL Collection Selection: "selectionExpression" with method invocation pushes root object as active context instead of current item [SPR-12035] #16651
- DefaultMessageListenerContainer#doShutdown hangs [SPR-11841] #16460
- Collection selection and the use of #this [SPR-10417] #15050
📔 Documentation
- Add xsd description for default handling of autowire and lazy-init attributes [SPR-13038] #17630
- Improve description of shutting down the IoC container in reference document [SPR-13000] #17592
- Modify typo in the reference document [SPR-12993] #17585
- Remove the RemoteAccountService(sample code for JAX-RPC) from the reference document [SPR-12992] #17584
- OXM exception hierarchy image is not displayed in reference manual [SPR-12990] #17582
- JpaDialect description replace to EclipseLink from TopLink [SPR-12988] #17579
- Remove descriptions of classic API of ORM(JDO/JPA) [SPR-12987] #17578
- Improve description of DefaultLobHandler in reference manual [SPR-12985] #17576
- Bad grammar in reference document [SPR-12981] #17572
- Reference manual should not refer to deprecated ParameterizedBeanPropertyRowMapper [SPR-12980] #17571
- Update documentation for the resultsMapCaseInsensitive flag in JdbcTemplate [SPR-12979] #17570
- Document meta-annotation support in AnnotationUtils [SPR-12940] #17533
- [doc] Update reference for STOMP client [SPR-12814] #17411
- Documentation regression: some TIP and NOTE wrongly displayed [SPR-12791] #17388
- Documentation the limitation of injecting components in
@Configuration
classes [SPR-12773] #17370 - Improve RedirectAttributes reference documentation [SPR-12759] #17356
- Document event infrastructure improvements [SPR-12702] #17299
- Document how to prevent a JNDI DataSource retrieved using JavaConfig to be removed on shutdown of the context [SPR-12551] #17153
- Modularize Asciidoc [SPR-12309] #16914