1. 17 12月, 2016 1 次提交
  2. 15 12月, 2016 2 次提交
  3. 14 12月, 2016 1 次提交
    • A
      Allow HandlerFunction to return Mono<ServerResponse> · 582e625f
      Arjen Poutsma 提交于
      This commit makes it possible for handler functions to return
      asynchronous status codes and headers, by making HandlerFunction.handle
      return a Mono<ServerResponse> instead of a ServerResponse. As a
      consequence, all other types that deal with HandlerFunctions
      (RouterFunction, HandlerFilterFunction, etc.) had to change as well.
      
      However, when combining the above change with method references (a very
      typical use case), resulting signatures would have been something like:
      
      ```
      public Mono<ServerResponse<Mono<Person>>> getPerson(ServerRequest request)
      ```
      
      which was too ugly to consider, especially the two uses of Mono. It was
      considered to merge ServerResponse with the last Mono, essentialy making
      ServerResponse always contain a Publisher, but this had unfortunate
      consequences in view rendering.
      
      It was therefore decided to drop the parameterization of ServerResponse,
      as the only usage of the extra type information was to manipulate the
      response objects in a filter. Even before the above change this was
      suggested; it just made the change even more necessary.
      
      As a consequence, `BodyInserter` could be turned into a real
      `FunctionalInterface`, which resulted in changes in ClientRequest.
      
      We did, however, make HandlerFunction.handle return a `Mono<? extends
      ServerResponse>`, adding little complexity, but allowing for
      future `ServerResponse` subtypes that do expose type information, if
      it's needed. For instance, a RenderingResponse could expose the view
      name and model.
      
      Issue: SPR-14870
      582e625f
  4. 02 12月, 2016 1 次提交
    • A
      Allow serving static files from RouterFunctions · 136b33bc
      Arjen Poutsma 提交于
      This commit adds the ability to serve Resources (static files) through a
      RouterFunction. Two methods have been added to RouterFunctions: one that
      exposes a given directory given a path pattern, and a generic method
      that requires a lookup function.
      
      Issue: SPR-14913
      136b33bc
  5. 27 10月, 2016 1 次提交
  6. 20 10月, 2016 3 次提交
    • A
      Add bodyToMono/bodyToFlux convenience methods · fa9cc1eb
      Arjen Poutsma 提交于
      This commit adds a bodyToMono and bodyToFlux convenience method to
      ClientResponse/ServerRequest, similar to the body(Publisher) method that
      is on ClientRequest/ServerResponse.
      fa9cc1eb
    • A
      Align web.reactive.function with WebClient · 7e907c1e
      Arjen Poutsma 提交于
      This commit changes web.reactive.function to reflect the introduction of
      the new WebClient. Changes include:
      
      - Request -> ServerRequest
      - Response -> ServerResponse
      - FilterFunction -> HandlerFilterFunction
      - StrategiesSupplier -> HandlerStrategies
      7e907c1e
    • A
      Moved BodyExtractor and BodyInserter to http.codec · dc1926a8
      Arjen Poutsma 提交于
      This commit moves the web.reactive.function.[BodyInserter|BodyExtractor]
      to http.codec, so that they can be used from the client as well.
      
      Furthermore, it parameterized both inserter and extractor over
      ReactiveHttpOutputMessage and ReactiveHttpInputMessage respectively, so
      that they can be limited to only be used on the client or server.
      dc1926a8
  7. 19 9月, 2016 1 次提交
  8. 17 9月, 2016 4 次提交
  9. 12 9月, 2016 2 次提交
  10. 09 9月, 2016 2 次提交
  11. 07 9月, 2016 1 次提交
    • A
      Polishing · f8ac17f2
      Arjen Poutsma 提交于
      Two changes to web.reactive.function:
      
       - Changed Response.stream method to allow for specific Publisher types
       to be returned in Response.
      
       - Router now stores HttpMessageReader|Writer retrieved from
       Configuration in the attributes as supplier, not as stream, to allow
       for multiple reads.
      f8ac17f2
  12. 01 9月, 2016 1 次提交
    • A
      Introduce new functional web API · f1319f58
      Arjen Poutsma 提交于
      This commit introduces a new, functional web programming model in the
      org.springframework.web.reactive.function package. The key types
      are:
      
       - Request and Response are new Java 8-DSLs for access to the HTTP
         request and response
       - HandlerFunction represents a function to handle a request to a
         response
       - RoutingFunction maps a request to a HandlerFunction
       - FilterFunction filters a routing as defined by a RoutingFunction
       - RequestPredicate is used by Router to create RoutingFunctions
       - RequestPredicates offers common RequestPredicate instances
      f1319f58