Commit Graph

1281 Commits

Author SHA1 Message Date
Rossen Stoyanchev 132022861e Remove ResourceServlet deprecated in 4.3.x
Issue: SPR-15984
2017-09-22 20:14:06 -04:00
Rossen Stoyanchev 816a58fcf9 RouterFunctionMapping provides getter for RouterFunction
Issue: SPR-15991
2017-09-22 15:15:41 -04:00
Juergen Hoeller 7ae59d0c2a Nullability refinements on private and static methods
Based on IntelliJ IDEA 2017.3 introspection results.

Issue: SPR-15756
2017-09-22 18:22:14 +02:00
Rossen Stoyanchev 819ca0dbd4 Expose getters for the configured HandlerMapping's
Issue: SPR-15934
2017-09-21 09:46:26 -04:00
Juergen Hoeller 5bdcb895c0 HttpEntityMethodProcessor lets entity headers override existing headers (again)
Issue: SPR-15952
2017-09-19 13:47:30 +02:00
Sebastien Deleuze 1bc93e3d0f Revisit nullability annotations
This commit introduces the following changes.

1) It adds a new Spring @NonNull annotation which allows to apply
@NonNullApi semantic on a specific element, like @Nullable does.
Combined with @Nullable, it allows partial null-safety support when
package granularity is too broad.

2) @Nullable and @NonNull can apply to ElementType.TYPE_USE in order
to be used on generic type arguments (SPR-15942).

3) Annotations does not apply to ElementType.TYPE_PARAMETER anymore
since it is not supported yet (applicability for such use case is
controversial and need to be discussed).

4) @NonNullApi does not apply to ElementType.FIELD anymore since in a
lot of use cases (private, protected) it is not part for the public API
+ its usage should remain opt-in. A dedicated @NonNullFields annotation
has been added in order to set fields default to non-nullable.

5) Updated Javadoc and reference documentation.

Issue: SPR-15756
2017-09-15 13:26:41 +02:00
Grant Hutchins f4ef5cd451 Fix broken RequestMappingHandlerAdapter setter
RequestMappingHandlerAdapter.setReactiveRegistry() doesn't actually set the value appropriately.

FYI: I found this using lgtm.com

https://lgtm.com/projects/g/spring-projects/spring-framework/alerts/?mode=list
2017-09-12 15:04:33 -04:00
Juergen Hoeller b122bc6dcc Upgrade to Hibernate Validator 6.0.2
Includes latest dependency updates (Netty 4.1.15, Undertow 1.4.19)

Issue: SPR-15808
2017-08-29 15:04:17 +02:00
Brian Clozel 582014e944 Support HTTP range requests in MVC Controllers
Prior to this commit, HTTP Range requests were only supported by the
ResourceHttpRequestHandler when serving static resources.

This commit improves the `HttpEntityMethodProcessor` and
the `RequestResponseBodyMethodProcessor`. They now extract
`ResourceRegion`s from the `Resource` instance returned by the
Controller and let the Resource-related message converters
handle the writing of the resource (including partial writes).

Controller methods can now handle Range requests for
return types that extend Resource or HttpEntity:

    @RequestMapping("/example/video.mp4")
    public Resource handler() { }

    @RequestMapping("/example/video.mp4")
    public HttpEntity<Resource> handler() { }

Issue: SPR-15789, SPR-13834
2017-08-24 20:50:37 +02:00
Brian Clozel 397fd24849 Revert "Leverage Kotlin plugin dependency management"
This reverts commit 3e2f6c848a.
2017-08-22 21:29:39 +02:00
Sebastien Deleuze 3e2f6c848a Leverage Kotlin plugin dependency management 2017-08-22 17:35:57 +02:00
Brian Clozel cc3d7d2d48 Apply dependency management to selected modules
This commit applies the Dependency Management Plugin to modules that
require it; right now Spring Framework is importing BOMs for Netty and
Reactor dependencies only.

Instead of applying those BOMs to all modules, they're applied only
where they're needed.

Issue: SPR-15885
2017-08-21 14:42:03 +02:00
Brian Clozel 2eeb428e95 Move modules to independent build files
The main `build.gradle` file contains now only the common build
infrastructure; all module-specific build configurations have
been moved to their own build file.

Issue: SPR-15885
2017-08-21 14:41:55 +02:00
Juergen Hoeller fac1f236c3 Upgrade to Servlet API 4.0 for MVC and merge EhCache 3 tests into spring-context-support
Includes general streamlining of dependency declarations with reduced version variables, direct use of EclipseLink 2.7 and its implicit JPA 2.2 dependency in spring-orm, mixed use of Hibernate 5.2.10 and 5.1.10 for integration tests, as well as an upgrade to Jetty 9.4.7 RC0 and a downgrade to Groovy 2.4.12 (since Groovy 2.5 won't be final in time for Spring Framework 5.0).

Issue: SPR-15879
Issue: SPR-15880
2017-08-21 01:34:11 +02:00
Stephane Nicoll f6e7fef236 Polish 2017-08-19 10:50:41 +02:00
Juergen Hoeller 9aa369f402 Data class construction supports field default/marker parameters
Issue: SPR-15871
2017-08-18 17:59:06 +02:00
Sebastien Deleuze 73cf07e9a4 Fix overridden methods nullability
Issue: SPR-15869
2017-08-17 15:02:59 +02:00
Juergen Hoeller 61cdc842e0 BindingResult support for constructor argument mismatch on immutable data object
Issue: SPR-15542
2017-08-17 11:02:40 +02:00
Juergen Hoeller b8f5e97ae5 Properly retrieve and expose HttpServletResponse for async requests
Issue: SPR-15867
2017-08-17 08:52:05 +02:00
Sebastien Deleuze f57e5584af Add a reference to KT-18833 in JDK 9 ignored tests 2017-08-14 11:47:08 +02:00
Rossen Stoyanchev b1440b6816 Remove ParsingPathMatcher
Now that we also have RequestPath and PathContainer with the latter as
the required input, the ParsingPathMatcher adapter can be removed.
2017-08-01 13:35:21 +02:00
Rossen Stoyanchev 4fc0ce1206 Properly detect null value params in params conditions
Issue: SPR-15831
2017-08-01 13:01:09 +02:00
Rossen Stoyanchev bb684ce60b Improve decoding support for multipart filename
StandardMultipartHttpServletRequest now properly decodes RFC-5987
encoded filenames (i.e. filename*) by delegating to ContentDisposition
and also support RFC-2047 syntax through javax.mail MimeUtility.

Issue: SPR-15205
2017-07-20 14:26:20 +02:00
Sebastien Deleuze fa4d139684 Support instantiating Kotlin classes with optional parameters
This commit updates BeanUtils class in order to add Kotlin optional
parameters with default values support to the immutable data classes
support introduced by SPR-15199.

Issue: SPR-15673
2017-07-20 10:44:06 +02:00
Juergen Hoeller ac1d3b22c9 Polishing 2017-07-19 22:22:27 +02:00
Juergen Hoeller 46eba3dbfa Nullability fine-tuning around declaration inconsistencies
Issue: SPR-15720
Issue: SPR-15792
2017-07-19 22:22:20 +02:00
Juergen Hoeller 9fc4fb10b0 Nullability fine-tuning around bean properties
Issue: SPR-15720
Issue: SPR-15792
2017-07-19 11:43:58 +02:00
Sebastien Deleuze fb4ddb0746 Make getters and setters null-safety consistent
This commit ensure that null-safety is consistent between
getters and setters in order to be able to provide beans
with properties with a common type when type safety is
taken in account like with Kotlin.

It also add a few missing property level @Nullable
annotations.

Issue: SPR-15792
2017-07-19 09:07:56 +02:00
Juergen Hoeller c292a89b24 Http(Async)Client not actually nullable, plus MethodInterceptor nullability
Issue: SPR-15720
2017-07-19 00:15:37 +02:00
Rossen Stoyanchev 70252a7335 Add tests for SPR-15777 2017-07-17 08:35:58 +02:00
Rossen Stoyanchev b0fc83ee05 Polish CssLinkResourceTransformer 2017-07-17 08:16:25 +02:00
Rossen Stoyanchev e37af83459 Improve docs on on use of urlDecode=false
Issue: SPR-15643
2017-07-14 16:52:02 +02:00
Rossen Stoyanchev 134ceac58e Set all strategies in CNM factory bean
ContentNegotiationManagerFactoryBean now provides an option to
explicitly set the strategies to use vs customizing a fixed
list of default strategies.

Issue: SPR-11114
2017-07-11 21:00:57 +02:00
Juergen Hoeller 00f4c36d7a Nullability fine-tuning (RequestContext, LocaleResolver)
Includes page-level JSTL time zone support for JSP tags.

Issue: SPR-15720
Issue: SPR-15746
2017-07-07 18:46:19 +02:00
Sebastien Deleuze 1fa8410995 Leverage RFC_1123_DATE_TIME formatter in tests
Issue: SPR-15661
2017-07-02 22:33:43 +02:00
Juergen Hoeller cc74a2891a @Nullable all the way: null-safety at field level
This commits extends nullability declarations to the field level, formalizing the interaction between methods and their underlying fields and therefore avoiding any nullability mismatch.

Issue: SPR-15720
2017-06-30 01:54:16 +02:00
Rossen Stoyanchev 67330dfc23 Expose mapped handler as an exchange attribute
Issue: SPR-15564
2017-06-29 13:18:39 -04:00
Juergen Hoeller 98642c7e29 Consistent ScriptTemplateView locale resolution via request
Issue: SPR-15064
2017-06-26 23:28:49 +02:00
Rossen Stoyanchev 5b8f7f503f Deprecate adapter classes for async interceptors 2017-06-26 15:34:51 -04:00
Rossen Stoyanchev eb0479dee8 Polish 2017-06-26 14:50:11 -04:00
Violeta Georgieva e0678ba583 Add onError callback to DeferredResult
Issue: SPR-15614
2017-06-26 14:12:56 -04:00
Juergen Hoeller 098ff6f0f8 Compatibility with JDK 9 release candidate build (175)
Includes upgrade to Objenesis 2.6, Gradle 3.5.1, RxJava 2.1.1, JSON Binding API 1.0 final.

Issue: SPR-15686
Issue: SPR-15600
2017-06-26 18:58:59 +02:00
Juergen Hoeller 155a1c6c71 AsyncHandlerInterceptor.afterConcurrentHandlingStarted declared as default method
Issue: SPR-15702
2017-06-26 18:58:39 +02:00
Rossen Stoyanchev 782c595cf7 Polish 2017-06-22 18:33:27 -04:00
Eko Kurniawan Khannedy ac68cc35c2 Ordered WebMvcConfigurer interceptor registrations
Issue: SPR-15620
2017-06-22 18:33:27 -04:00
Sebastien Deleuze d5f9ad03a7 Support ScriptEngine#eval(String, Bindings) in ScriptTemplateView
Supporting ScriptEngine#eval(String, Bindings) when no render function
is specified allows to support use cases where script templates are
simply evaluating a script expression with an even more simplified
configuration.

This improvement also makes it possible to use script engines that
do not implement Invocable.

Issue: SPR-15115
2017-06-16 10:38:59 +02:00
Rossen Stoyanchev ef3e309c12 Adjust timeout in Spring MVC for reactive streaming
Issue: SPR-15669
2017-06-15 13:11:59 -04:00
Juergen Hoeller 72a8868f84 FreeMarker macros based on HTML output format (requires FreeMarker 2.3.24+)
Issue: SPR-14740
2017-06-13 14:21:09 +02:00
Juergen Hoeller 779deb0fa7 Cleanup of duplicate semicolons
Issue: SPR-15654
2017-06-13 11:38:05 +02:00
Juergen Hoeller 7dd8dc62a5 Fixes for ignored tests after last week's nullability commit
Issue: SPR-15540
2017-06-13 11:37:58 +02:00