Commit Graph

13280 Commits

Author SHA1 Message Date
Sam Brannen 8f62b63663 Introduce 'value' alias for @Bean's 'name' attribute
In order to simplify configuration for use cases involving @Bean where
only a bean name or aliases are supplied as an attribute, this commit
introduces a new 'value' attribute that is an @AliasFor 'name' in @Bean.

Issue: SPR-14728
2016-09-17 16:16:06 +02:00
Arjen Poutsma 778ef02680 Rename BodyInsertor to BodyInserter 2016-09-17 16:07:00 +02:00
Arjen Poutsma b6035ce9ae Refactor BodyInsertor
Refactor BodyInsertor to expose insertion logic directly, rather than
exposing a writer function and supplier.
2016-09-17 11:48:53 +02:00
Arjen Poutsma 3f55706413 Rename BodyPopulator to BodyInsertor 2016-09-17 11:29:04 +02:00
Arjen Poutsma 1bf75e330c Fix tangle
Fixed package tangle between w.r.f.RequestPredicates and w.r.f.support.RequestWrapper.
2016-09-17 11:05:05 +02:00
Rossen Stoyanchev b2ccdfbc9e Polish error logging for HTTP reactive server classes 2016-09-16 16:09:44 -04:00
Violeta Georgieva 80ff5ae9c5 Improve exception handling when clients disconnect.
Issue: SPR-14538
2016-09-16 16:09:43 -04:00
Brian Clozel c4b9b92247 Polish ResponseExtractors 2016-09-16 21:39:38 +02:00
Rob Winch b58a06208f Add HttpBasic ClientWebRequestPostProcessor
Issue: SPR-14682
2016-09-16 21:29:59 +02:00
Rossen Stoyanchev 0bace1b0ae Add getContextPath to ServerHttpRequest
Issue: SPR-14726
2016-09-16 15:21:48 -04:00
Juergen Hoeller 3772398700 Explicit sun.nio.ch export for Netty's NioEventLoopGroup on JDK 9
Issue: SPR-14645
2016-09-16 18:59:14 +02:00
Juergen Hoeller b60af42e23 Polishing
(cherry picked from commit ace25d4)
2016-09-16 18:59:14 +02:00
Rossen Stoyanchev cf2112f539 Update intializer for the reactive servlet adapter
Move the AbstractServletHttpHandlerAdapterInitializer together with
the other two base classes in spring-web-reactive. Since the
interface is in the web package, this avoids a package cycle.
Also add a mention in the reference.

Issue: SPR-14713
2016-09-16 12:57:16 -04:00
Arjen Poutsma 2b57a4d618 Add WebApplicationInitializers for Web Reactive
This commit introduces three new WebApplicationInitializers for use with
Spring Web Reactive:

 - The AbstractServletHttpHandlerAdapterInitializer registers a
 ServletHttpHandlerAdapter that wraps a user-provided HttpHandler.

 - The AbstractDispatcherHandlerInitializer registers a
 ServletHttpHandlerAdapter that wraps a DispatcherHandler (or any
 WebHandler). The handler is provided with an application context.

 - The AbstractAnnotationConfigDispatcherHandlerInitializer is a
 subclass of the above, creating an
 AnnotationConfigApplicationContext based no provided @Configuration
 classes.

Issue: SPR-14713
2016-09-16 12:57:16 -04:00
Arjen Poutsma b703dbf6ab Polishing 2016-09-16 18:44:35 +02:00
Arjen Poutsma de3e07b320 Move instance methods before static methods 2016-09-16 18:44:35 +02:00
Arjen Poutsma c57beef95e Rename RoutingFunction to RouterFunction 2016-09-16 18:44:35 +02:00
Arjen Poutsma 228a01b298 Polishing 2016-09-16 18:44:34 +02:00
Arjen Poutsma 8072497ce2 Extract body extraction logic in w.r.f
This commit refactors the response body extraction logic into a separate
function: BodyExtractor. Standard populators can be found in
BodyExtractors.
2016-09-16 18:44:34 +02:00
Arjen Poutsma 5e730408fd Extract body population logic in w.r.f
This commit extracts the response body insertion logic into a separate
strategy interface: BodyPopulator. Standard populators can be found in
BodyPopulators.
2016-09-16 18:44:34 +02:00
Arjen Poutsma 91bde2e6b2 Refactor Router to RoutingFunctions
This commit refactors the Router into a RoutingFunctions class, by:

  - Renaming the class :)
  - Moving all Configuration logic into a separate, top-level
  Configuration class with mutable builder.
2016-09-16 18:44:34 +02:00
Rossen Stoyanchev aaa1281809 Remove Exception declaration in abstract Encoder 2016-09-16 12:20:15 -04:00
Sebastien Deleuze 9d8c089a21 Polish 2016-09-16 16:17:37 +02:00
Sebastien Deleuze 6cda08e94b Add Jackson @JsonView support
Issue: SPR-14693
2016-09-16 12:51:27 +02:00
Sebastien Deleuze e74c59bf30 Introduce ServerHttpMessageWriter/Reader to resolve hints
Issue: SPR-14693
2016-09-16 12:51:27 +02:00
Brian Clozel 084daa7fb5 Document media type registration for appcache files
Since appcache manifests can have various file extensions, developers
should register the (file extension, media type) mapping in their Spring
MVC / Reactive Web configuration.

This commit adds javadoc on both `AppCacheManifestTransformer` variants
to explain how to do that.

Issue: SPR-14510
2016-09-16 12:04:56 +02:00
Juergen Hoeller 3fdc11e739 Latest dependency updates (Undertow 1.4.3, EhCache 3.1.2, Caffeine 2.3.3, Rome 1.7, Woodstox 5.0.3, Jettison 1.3.8, JRuby 9.1.5.0, RxJava 2.0 RC2, RxNetty 0.5.2 RC4) 2016-09-16 10:39:26 +02:00
Juergen Hoeller 2b2cc2d1ca Rearranged field order in RootBeanDefinition
Issue: SPR-14725
2016-09-16 10:34:05 +02:00
Stephane Nicoll 2b0bf9f04a Add Qualified element on RootBeanDefinition
Improve RootBeanDefinition to specify an AnnotatedElement that holds
qualifier information. When such element is present, any qualifier that
it defines will be used to find a matching candidate.

Issue: SPR-14725
2016-09-16 09:20:31 +02:00
Juergen Hoeller f24ce76edb StringUtils.parseLocaleString accepts Java 7 variants
Issue: SPR-14718
2016-09-15 14:31:05 +02:00
Juergen Hoeller 6de4b12992 Adapted recent tests to pass on Windows 2016-09-15 14:12:49 +02:00
Juergen Hoeller 6dc1898dbb Timeout exceptions as RuntimeExceptions
Issue: SPR-14669
2016-09-15 08:54:17 +02:00
Rossen Stoyanchev 765b47246a Improve async request timeout handling
Rather than setting the status to 503 directly from the timeout
interceptor which no longer seems to work reliably with Servlet
containers like Jetty even performing an additional ERROR dispatch back
to the original URL, we know rather set the DeferredResult to an
AsyncTimeoutException, which results in a dispatch and standard
handling within Spring MVC. This should be a more reliable way of
dealing with timeouts.

Issue: SPR-14669
2016-09-14 21:34:30 -04:00
Rossen Stoyanchev 8ccfecc406 Workaround for Content-Length issue in Reactor Netty
Issue: SPR-14643
2016-09-14 17:45:27 -04:00
Rossen Stoyanchev e024aa0049 Follow up fix for PR #1168 2016-09-14 17:35:14 -04:00
Rossen Stoyanchev 3bc1121b9d Check both connection and connected flag
Issue: SPR-14703
2016-09-14 17:19:49 -04:00
Arjen Poutsma c6a61e0d85 Add Resource.readableChannel()
Added readableChannel() to Resource, which returns a
java.nio.ReadableByteChannel. The default implementation uses
Channels.newChannel() to create a channel based on what is returned from
getInputStream(). Subclasses have more effecient, file-based
implementations.

Issue: SPR-14698
2016-09-14 15:46:15 -04:00
Stephane Nicoll 06395f41cb Merge pull request #1172 from kosmaty:punctuation-formatting-fix
* pr/1172:
  Fix doc style
2016-09-14 11:08:02 +02:00
kosmaty eef41fd8ab Fix doc style
Closes gh-1172
2016-09-14 11:07:26 +02:00
Rossen Stoyanchev bc14c5ba83 Polish [CssLinkResource|AppCacheManifest]Transformer
This commit updates the two transformers to make them more
consistent with updates of their spring-web-reactive equivalents.

Issue: SPR-14521
2016-09-13 18:04:40 -04:00
Rossen Stoyanchev 33d90747a1 Asynchronous ResourceResolver + ResourceTransformer
Issue: SPR-14521
2016-09-13 18:04:40 -04:00
Juergen Hoeller f592599349 Polishing
(cherry picked from commit 54db496)
2016-09-13 23:48:41 +02:00
Juergen Hoeller 782c99dfaf PropertySourcesPropertyResolver does not log retrieved value by default
Issue: SPR-14709
(cherry picked from commit fbe7ddb)
2016-09-13 23:48:15 +02:00
Juergen Hoeller ce42ed4d44 Polishing 2016-09-13 21:58:41 +02:00
Juergen Hoeller c69e6a36f7 Revised IllegalArgumentException handling for Formatter parse calls
Issue: SPR-14661
2016-09-13 21:55:20 +02:00
Juergen Hoeller 0c2e8a6246 Consistent callbacks for TypeFilters, ImportSelectors and ImportBeanDefinitionRegistrars
Issue: SPR-14686
2016-09-13 21:49:24 +02:00
Juergen Hoeller 5405c07d26 Configuration class processing uses MetadataReaderFactory for current ResourceLoader
Issue: SPR-14684
2016-09-13 21:47:32 +02:00
Juergen Hoeller 34ab818dfa HibernateExceptionTranslator avoids JPA IllegalState/ArgumentException translation
Issue: SPR-14681
2016-09-13 21:46:02 +02:00
Juergen Hoeller 480cd2c2f0 IdentityHashMap for scheduled tasks (avoiding hashCode calls on bean instances)
Issue: SPR-14666
2016-09-13 21:44:29 +02:00
Juergen Hoeller a86f6d3676 ApplicationEventPublisher as functional interface
Issue: SPR-14699
2016-09-13 21:42:23 +02:00