Commit Graph

32657 Commits

Author SHA1 Message Date
Juergen Hoeller
76f84b914f Polishing 2015-12-09 13:10:04 +01:00
Juergen Hoeller
11806b9215 Class identity comparisons wherever possible (and further polishing)
Issue: SPR-12926
2015-12-09 12:28:09 +01:00
Juergen Hoeller
4261f34b63 Consistent and lenient HttpMethod resolution across all web modules
Issue: SPR-13776
2015-12-09 12:26:44 +01:00
Stephane Nicoll
34b596c6bf Polish cache javadoc
Issue: SPR-13746
2015-12-09 11:24:53 +01:00
Sebastien Deleuze
78454f5a2e Add a link to Spring Reactive Playground 2015-12-09 11:18:50 +01:00
Juergen Hoeller
0d6545f47c Latest dependency updates (Jackson 2.6.4, Quartz 2.2.2, C3P0 0.9.5.2) 2015-12-09 11:11:03 +01:00
Rossen Stoyanchev
ef3560a55a Add HttpHandlerDecorator and fix test package 2015-12-08 22:50:25 -05:00
Rossen Stoyanchev
1dcaff8a5c Updates to Javadoc 2015-12-08 22:50:24 -05:00
Stephane Maldini
fbb0c702c9 minor reactor server impl to fulfill core introspection 2015-12-09 01:58:53 +00:00
Rossen Stoyanchev
ad4be9462b Drop use of WebApplicationContext in tests
It brings along Servlet imports.
2015-12-08 14:33:23 -05:00
Juergen Hoeller
8346eeda27 Reset BytesMessage after payload extraction
Issue: SPR-13769
2015-12-08 17:12:38 +01:00
Juergen Hoeller
9589749fb2 Introduced createMethodJmsListenerEndpoint template method
Issue: SPR-13774
2015-12-08 17:07:40 +01:00
Stephane Maldini
4616938525 Prepare for a future change to downstream() inner method in reactor-core 2015-12-08 13:21:35 +00:00
Juergen Hoeller
b3115fcd85 Upgrade to Tomcat 8.0.30 and Undertow 1.3.9 2015-12-07 23:38:48 +01:00
Rossen Stoyanchev
45706422dd InvocableHandlerMethod and arg resolution updates
General improvements e.g. make use of Java 8 Stream. The main reason
for the refactoring however to tighten error handling. To that extent:

InvocableHandlerMethod turns all exceptions into Reactive Streams
error signals, in effect never allowing any Exceptions to bubble up.

HandlerMethodArgumentResolver may throw an Exception for sync resolution
or produce an error signal via the returned Publisher. Either way the
exception is consistently wrapped with helpful method argument details.
For the latter case using a custom mapError operator.

HandlerMethodArgumentResolver no longer needs to return Optional for
nullable argument values. Instead (for now) the defaultIfEmpty operator
of reactor.rx.Stream operator is used to ensure a default constant value
(called "NO_VALUE") is produced. That way an argument resolver may
produce 0..1 values where 0 means it did not resolve to any value and
that results in null passed as the argument value.

If a HandlerMethodArgumentResolver produces more than one value, all
additional values beyond the first one will be ignored with the help
of a custom "first" operator.

As HandlerMethod is invoked within the map operator, checked exceptions
are not allowed but instead of wrapping it in a runtime exception what
we really need is to unwrap the target exception for exception
resolution purposes. To this end concatMap is used to produce a nested
Publisher or an error Publisher with the unwrapped target exception.

Related to that InvocableHandlerMethod now returns
Publisher<HandlerResult> instead of Publisher<Object> so that no longer
needs to be externally mapped from Object to HandlerResult.

InvocableHandlerMethodTests provides tests for the above scenarios and
verifies the details of resulting error signals.
2015-12-07 17:36:58 -05:00
Juergen Hoeller
d2ad2c3af8 StatementCreatorUtils detects Microsoft SQL Server driver 4.0 as well
Issue: SPR-13772
2015-12-07 17:37:52 +01:00
Juergen Hoeller
d0814703c4 AnnotationUtils.synthesizeAnnotation explicitly checks whether SynthesizedAnnotation is exposable
Issue: SPR-13696
2015-12-07 17:36:14 +01:00
Juergen Hoeller
40cff5e340 Polishing 2015-12-07 17:30:25 +01:00
Juergen Hoeller
ee35b5ed07 Polishing 2015-12-07 12:52:06 +01:00
Juergen Hoeller
7a8a9c71b6 Javadoc fixes
Issue: SPR-13763
2015-12-07 12:51:44 +01:00
Juergen Hoeller
1585a822d6 Javadoc fixes
Issue: SPR-13765
2015-12-07 12:50:23 +01:00
Juergen Hoeller
b1ef6ece9f AbstractRequestLoggingFilter unwraps request to find ContentCachingRequestWrapper
Issue: SPR-13764
2015-12-07 12:47:38 +01:00
Juergen Hoeller
20beace1bf AnnotationConfigWebApplicationContext allows for custom AnnotatedBeanDefinitionReader/ClassPathBeanDefinitionScanner
Issue: SPR-9324
2015-12-07 12:46:32 +01:00
Sebastien Deleuze
ce0bd2efc2 Improve Gradle dependencies version management
This commit also updates to the following dependencies:
 - Spring Framework 4.2.3.RELEASE
 - RxJava 1.1.0
2015-12-07 11:35:00 +01:00
Juergen Hoeller
9973694ed2 Polishing 2015-12-04 20:43:20 +01:00
Rossen Stoyanchev
153a23dbf9 Configure view controllers with ApplicationContext
Issue: SPR-13762
2015-12-04 13:09:37 -05:00
Juergen Hoeller
3d1ae9c604 Efficient and consistent setAllowedOrigins collection type
Issue: SPR-13761
2015-12-04 16:21:53 +01:00
Juergen Hoeller
cd4ce8727e WebSocket namespace consistently applies resolvable allowed-origins value
Issue: SPR-13760
2015-12-04 16:01:14 +01:00
Juergen Hoeller
d64ac32e3d ControllerAdviceBean accepts bean types without @ControllerAdvice annotation (as in 3.2)
Issue: SPR-13759
2015-12-04 13:03:00 +01:00
Juergen Hoeller
415b92b6d1 Upgrade to Hibernate 5.0.5 and Undertow 1.3.8 2015-12-04 13:01:28 +01:00
Juergen Hoeller
08b6daf1eb Polishing 2015-12-03 18:41:03 +01:00
Juergen Hoeller
08ff3a85bf Integration test for proper re-resolution of Optional @RequestPart argument
Includes a trivial refinement of RestTemplate's ResourceAccessException message.

Issue: SPR-13755
2015-12-03 12:55:32 +01:00
Juergen Hoeller
c909789ea9 Avoid mismatch between cached top-level versus nested parameter type
Issue: SPR-13755
2015-12-03 12:53:18 +01:00
Rossen Stoyanchev
da98becf72 Move http.server to http.server.reactive 2015-12-02 17:46:07 -05:00
Rossen Stoyanchev
f5e681e6e6 lastSessionCheckTime updated after session check
Issue: SPR-13745
2015-12-02 15:07:52 -05:00
Juergen Hoeller
a9e5e9ecc8 Polishing 2015-12-02 15:35:42 +01:00
Juergen Hoeller
747863d503 Documented units for send-time limit and buffer-size limit
Issue: SPR-13753
2015-12-02 13:52:13 +01:00
Juergen Hoeller
3fec802b46 Fixed formatting in AOP documentation
Issue: SPR-13750
2015-12-02 13:39:26 +01:00
Juergen Hoeller
a4f5c46fed MockHttpServletResponse.setIntHeader supports 'Content-Length' header as well
Issue: SPR-13752
2015-12-02 13:36:35 +01:00
Rossen Stoyanchev
382c98f968 Remove isolated use of Reactor Buffer 2015-12-01 18:19:14 -05:00
Rossen Stoyanchev
df80ffbf28 Spring-consistent naming in server.http package
This change also removes reactor-stream variants of the request and
response since the request and response aren't used directly by
application code and get passed through reactor.Publishers anyway.
2015-12-01 18:09:53 -05:00
Rossen Stoyanchev
4d4d2e2966 Merge pull request #928 from mhartsock/SPR-13747 2015-12-01 16:53:11 -05:00
Rossen Stoyanchev
b3f0ab5284 Polish 2015-12-01 16:52:02 -05:00
mhartsock Melissa Hartsock
b077b4dddb Fix media type lookup case sensitivity
Fixed a bug where the URL content negotiation "format" parameter values
were case sensitive and only lowercase values were accepted. For
example, URL query parameter format=json returned the appropriate JSON
response but format=JSON resulted in a
HttpMediaTypeNotAcceptableException and returned:

406 - The resource identified by this request is only capable of
generating responses with characteristics not acceptable according to
the request "accept" headers.

When the MappingMediaTypeFileExtensionResolver is constructed, it is
passed a map containing the media type key to MediaType mappings
defined in the ContentNegotiationConfigurer. In the constructor of
MappingMediaTypeFileExtensionResolver, the keys are converted to
lowercase and the mappings of keys to MediaTypes are added to the
ConcurrentMap<String, MediaType> mediaTypes using the lowercase
version of the keys. However, when retrieving the MediaType from a key
in the lookupMediaType method, no conversion to lowercase is performed
so any value for the URL "format" parameter other than the lowercase
version will not return the proper MediaType result.

On May 1st, 2014, a change was made to
ParameterContentNegotiationStrategy to handle cases where the content
negotiation format URL parameter does not result in a match for a
MediaType. If no match is found, a HttpMediaTypeNotAcceptableException
is thrown resulting in the 406 response above. Prior to this commit, a
null was returned instead of throwing an exception so this issue was
hidden and appeared to function correctly.

To make the media type lookup case insensitive, added a line to the
lookupMediaType method in MediaTypeFileExtensionResolver to first
convert the extension (media type key) to lowercase prior to attempting
to retrieve it from the mediaTypes map.

Issue: SPR-13747
2015-12-01 16:16:57 -05:00
Rossen Stoyanchev
dacbf4cb34 Update Javadoc on UriComponentsBuilder.query 2015-12-01 16:09:05 -05:00
Juergen Hoeller
e78425103e Polishing 2015-12-01 18:04:03 +01:00
Stephane Maldini
b9a52d5f7c Change to Definitive generic signature for Publishers.zip 2015-12-01 16:51:52 +00:00
Juergen Hoeller
7589c1f164 Aligned class name quoting with ConversionFailedException 2015-12-01 16:10:11 +01:00
Juergen Hoeller
44651fdf7c ObjectToObjectConverter caches detected methods/constructors
This commit reworks the arrangement to a centralized cache, avoiding any extra reflection attempts if a cache entry is known already. In the course of this, it also enforces toXXX methods to be declared as non-static now (which is the only sensible arrangement anyway).

Issue: SPR-13703
2015-12-01 16:07:21 +01:00
Stephane Maldini
9ce5c7416b compiler issue ? 2015-12-01 15:01:34 +00:00