Commit Graph

19930 Commits

Author SHA1 Message Date
Rossen Stoyanchev
57dc8199fb Add ReactiveHttpFilter 2015-11-25 13:11:01 -05:00
Stephane Nicoll
c90ca15add Fix caching tests
Update assertion to validate the proper exception type is thrown.
2015-11-25 17:49:44 +01:00
Juergen Hoeller
17df02d01e Explicit flush example with JPA EntityManager
Issue: SPR-13723
2015-11-25 16:58:17 +01:00
Juergen Hoeller
24e4f56d7e Test case for event listener methods on bean with potentially inactive scope
Also taking the opportunity to refine the "No Scope registered" exception message a bit.

Issue: SPR-13681
2015-11-25 16:56:39 +01:00
Juergen Hoeller
bb05bc7c01 EventListenerMethodProcessor leniently handles unresolvable bean types
Issue: SPR-13712
2015-11-25 15:40:38 +01:00
Juergen Hoeller
2a3bf69991 AsyncAnnotationBeanPostProcessor leniently handles ambiguous TaskExecutor beans
Issue: SPR-13720
2015-11-25 15:39:12 +01:00
Sebastien Deleuze
0f8a4bf706 Polish imports 2015-11-25 10:42:23 +01:00
Sebastien Deleuze
b18919d111 Improve Javadoc for HandlerAdapter and HandlerMapping 2015-11-25 10:35:09 +01:00
Andy Clement
58756b023c Ensure cast correctly included for OpPlus compilation
When the plus operator is used between strings in a SpEL
expression and that expression is compiled, it is
important to include a cast if computation of any of
the operands isn't obviously leaving strings on the
stack. Likewise if the stack contents are known to
be strings, a cast should not be included.

Issue: SPR-12426
2015-11-24 16:35:08 -08:00
Juergen Hoeller
d5ca5b74a5 DateTimeFormatterRegistrar supports Duration and Period as well
Issue: SPR-13721
2015-11-25 00:21:03 +01:00
Rossen Stoyanchev
d319edba28 HandlerMapping is now asynchronous 2015-11-24 17:36:44 -05:00
Brian Clozel
b35d44bd4c Fix inputstream reading for HTTP range requests
Prior to this commit, range requests would be served by
ResourceHttpRequestHandler by partially reading the inputstream of
static resources. In case of resources contained in ZIP/JAR containers,
InputStreams may not fill the entire read buffer when calling
`inputStream.read(byte[])`. This was the case when using Spring Boot's
ZipInflaterInputStream - this would then not read the entire file
content and would close the response without writing the expected body
length indicated in the "Content-Length" header.

This commit makes sure that the whole resource is read.

Issue: SPR-13661
2015-11-24 21:36:22 +01:00
Sebastien Deleuze
dc57e2621c Move HttpServer related classes back to src/main/java
This is needed in order to be able to use Spring Reactive in standalone
applications. These are temporary classes that will return in
src/test/java when Spring Boot support for Reactive applications will
be implemented.
2015-11-24 18:11:44 +01:00
Juergen Hoeller
20a286b4d6 ASM ClassWriter uses application ClassLoader for its getCommonSuperClass check
Issue: SPR-13695
2015-11-24 17:38:02 +01:00
Juergen Hoeller
3aefc96593 @ManagedOperationParameter declares @Target/@Retention/@Documented/@Repeatable now
This also turns @ManagedNotification into a repeatable annotation and consistently applies findAnnotation/getRepeatableAnnotations.

Issue: SPR-13700
2015-11-24 17:37:51 +01:00
Juergen Hoeller
0524f3a474 Class identity comparisons wherever possible
Issue: SPR-12926
2015-11-24 17:37:30 +01:00
Juergen Hoeller
e8417ea6e1 SimpAnnotationMethodMessageHandler skips template variable check in case of no pattern
Issue: SPR-13704
2015-11-24 17:37:12 +01:00
Brian Clozel
9d9433a6eb Flush of underlying response in ContentCachingResponseWrapper
Prior to this commit, when adding a ShallowEtagHeaderFilter to an
application, the ServletResponse would be wrapped by a
ContentCachingResponseWrapper. When any part of the Spring
infrastructure calls `flushBuffer` on the wrapped response, the call is
delegated to the actual response, which is committed. It's not possible
to alter the response (headers, content) anymore - the ETag filter can't
act.

This change prevents the `flushBuffer` call to be delegated and only
commits the underlying response once the cached content is copied to the
actual response stream.

Issue: SPR-13717
2015-11-24 17:26:03 +01:00
Stephane Nicoll
bf1afdfdc9 Add cache tests for JCache 2015-11-24 10:15:09 +01:00
Andy Clement
29303ef591 Allow MapAccessor to be compilable in SpEL expressions
With this change the MapAccessor now extends CompilablePropertyAccessor
rather than just PropertyAccessor. This means that any expression that
ends up using the MapAccessor is now compilable for fast performance.

Issue: SPR-13638
2015-11-23 09:25:57 -08:00
Stephane Nicoll
610b5a20ea Fix test name 2015-11-23 18:22:53 +01:00
Stephane Nicoll
8dea3c5ade Remove test duplication 2015-11-23 18:19:58 +01:00
Stephane Nicoll
918e0a3888 Merge pull request #926 from kazuki43zoo/modify-tld-in-adoc
* pr/926:
  Add link in jsp tag library
2015-11-23 09:27:20 +01:00
Kazuki Shimizu
66d99f05aa Add link in jsp tag library
Closes gh-926
2015-11-23 09:26:07 +01:00
Rossen Stoyanchev
4a3c0bc3b6 Remove top-level org.springfamework.reactive package
reactive.codec -> core.codec
reactive.io    -> util

These may very well not be the final locations. For now they simply
express that there are classes that belong somewhere in core, i.e.
they are lower level dependencies than web.
2015-11-22 15:02:18 -05:00
Rossen Stoyanchev
911d376922 Improve MimeType -> MediaType handling
This change adds an Encoder-to-MediaType lookup in
ResponseBodyResultHandler to avoid MimeType to MediaType creation at
runtime.
2015-11-22 14:41:59 -05:00
Rossen Stoyanchev
8d30722f21 Remove @MVC test with multiple matches
RequestMappingHandlerMapping currently picks the first match and does
have logic to deal with selecting the best match. This caused a
random test failure depending on which controller method was matched
first. This change removes the test.
2015-11-20 13:17:10 -05:00
Rossen Stoyanchev
e9e4bcdc59 Move ~.web.reactive.server to ~.http.server 2015-11-20 13:10:44 -05:00
Rossen Stoyanchev
5f2d34f526 Update Javadoc
Issue: SPR-13678
2015-11-17 15:19:40 -05:00
Sam Brannen
de9c030ba1 Suppress warnings in Gradle build 2015-11-17 14:10:35 +01:00
Stephane Nicoll
d6073eaf8d Merge pull request #923 from uthark/patch-2
* pr/923:
  Remove invalid underscore
2015-11-17 09:58:49 +00:00
Oleg Atamanenko
b2c132633f Remove invalid underscore
Closes gh-923
2015-11-17 09:58:08 +00:00
Stephane Nicoll
e0f4736426 Merge pull request #922 from uthark/patch-1
* pr/922:
  Add quotes around attribute value
2015-11-17 09:57:15 +00:00
Oleg Atamanenko
a834639ac8 Add quotes around attribute value
Closes gh-922
2015-11-17 09:56:46 +00:00
Sam Brannen
59d60c60cf Polishing 2015-11-16 01:44:16 +01:00
Spring Buildmaster
d781ac0c92 Next Development Version 2015-11-15 08:33:31 -08:00
Juergen Hoeller
1cb6069734 Polishing 2015-11-14 23:52:39 +01:00
Sam Brannen
4b682275c9 Clean up warnings in spring-test 2015-11-14 22:57:33 +01:00
Juergen Hoeller
5b901852e6 Upgrade to HtmlUnit 2.19
This upgrade includes AutoCloseable support for HtmlUnit WebConnections as introduced in 2.19, while remaining compatible with 2.18.

Issue: SPR-13686
2015-11-14 15:32:42 +01:00
Rossen Stoyanchev
81867fa423 Refactor package structure for web
The web related code is now under org.springframework.web.reactive.
This is parallel to org.springframework.web (the top-level package of
spring-webmvc).
2015-11-13 17:49:31 -05:00
Rossen Stoyanchev
54ce20a5e0 Rename field in HandlerResult 2015-11-13 17:23:00 -05:00
Sebastien Deleuze
c6713c23e3 Add a ResolvableType field to HandlerResult
This change allows to be able to check generic type on the return value
at HandlerAdapter and ResultHandler level. For example, it allows to do
a Publisher<Void> check in SimpleHandlerResultHandler.
2015-11-13 17:09:02 -05:00
Rossen Stoyanchev
5d4201d500 Fix "Content-Type" and "Accept" header processing
"Content-Type" is just a single MediaType.

For the response, the MediaType must be fully selected before
selecting and encoder.

The ResponseBodyResultHandler now includes actual content negotiation
with a potential 406 response.
2015-11-13 16:47:52 -05:00
Juergen Hoeller
ce5887795b Latest dependency updates (JasperReports 6.2, Jetty 9.3.6, Joda-Time 2.9.1, HttpAsyncClient 4.1.1) 2015-11-13 22:46:03 +01:00
Rossen Stoyanchev
2de127ad4a Polish 2015-11-13 15:55:50 -05:00
Juergen Hoeller
6d5c646faf Empty lists declared with element type (for javac to accept it)
Issue: SPR-13680
2015-11-13 21:18:28 +01:00
Sebastien Deleuze
bdc5b38cb1 Refactor codecs
This commit introduces the following changes:
 - MessageToByteEncoder/Decoder renamed to Encoder/Decoder
 - JsonObjectEncoder/Decoder are now used directly in
   JacksonJsonEncoder/Decoder
 - Codec uses MimeType instead of MediaType since they
   are not specific to HTTP
 - Default MimeType are now managed thanks to
   Encoder/Decoder#getSupportedMimeTypes()
 - AbstractEncoder/Decoder takes care of generic MimeType related behavior
2015-11-13 15:01:02 -05:00
Juergen Hoeller
3cb926e01c Task list getters never return null now
Issue: SPR-13680
2015-11-13 20:26:44 +01:00
Juergen Hoeller
55d20557e0 Task list getters explicitly check for null now
Issue: SPR-13680
2015-11-13 14:25:28 +01:00
Juergen Hoeller
4b2ce60d65 Polishing 2015-11-13 08:31:13 +01:00