Commit Graph

4730 Commits

Author SHA1 Message Date
Brian Clozel 99656b9dd8 Merge branch '2.1.x' 2019-02-08 18:35:12 +01:00
Brian Clozel 72c8e5d366 Collect HTTP trace at commit time for WebFlux
Prior to this commit, the `HttpTraceWebFilter` would collect the
response information (status and headers) for tracing purposes, after
the handling chain is done with the exchange - inside a
`doAfterSuccessOrError`.

Once the handler has processed the exchange, there is no strong
guarantee about the HTTP resources being still present. Depending on the
web server implementation, HTTP resources (including HTTP header maps)
might be recycled, because pooled in the first place.

This commit moves the collection and processing of the HTTP trace right
before the response is committed. This removes the need to handle
special cases with exceptions, since by that time all exception handlers
have processed the response and the information that we extract is the
information that's about to be written to the network.

Fixes gh-15819
2019-02-08 18:16:39 +01:00
Brian Clozel e8fef97335 Merge branch '2.1.x' 2019-02-08 12:29:39 +01:00
Brian Clozel cba6079b7b Log unhandled server exceptions in WebFlux
Prior to this commit, errors unhandled by custom `WebExceptionHandler`
and resulting in an HTTP 500 status would not be logged at ERROR level,
giving no information to developers about the actual exception.

This commit ensures that such exceptions are logged at the ERROR level
with their exception. By the time the exception hits the
`DefaultErrorWebExceptionHandler`, if the response is already committed
or if the exception is due to a client disconnecting, the error is
delegated to Framework support as Spring Boot won't be able to render an
error page as expected.

Fixes gh-15769
2019-02-08 12:25:05 +01:00
Stephane Nicoll 380d7ec01c Merge branch '2.1.x' 2019-02-08 09:21:06 +01:00
Johnny Lim 885c28891b Polish
Closes gh-15873
2019-02-08 09:20:15 +01:00
Stephane Nicoll 9eccf6c367 Merge branch '2.1.x' 2019-02-08 08:45:43 +01:00
dreis2211 48295e16fc Fix assertion
Closes gh-15871
2019-02-08 08:45:12 +01:00
Madhura Bhave e3fad4e973 Merge branch '2.1.x' 2019-02-07 16:42:10 -08:00
Madhura Bhave dc31f617b3 Document limitations of YAML documents & profile-specific files
Fixes gh-15790
2019-02-07 16:40:53 -08:00
Andy Wilkinson 88f563ab4f Merge branch '2.1.x' 2019-02-07 14:36:19 +00:00
Andy Wilkinson 688eb894d0 Start building against Micrometer 1.1.3 snapshots
See gh-15869
2019-02-07 12:44:10 +00:00
Andy Wilkinson 4efca4a455 Start building against Spring Session Bean-SR3 snapshots
See gh-15868
2019-02-07 12:43:26 +00:00
Andy Wilkinson 01693bb1fd Start building against Spring Kafka 2.2.4 snapshots
See gh-15867
2019-02-07 12:42:45 +00:00
Andy Wilkinson 474a706cc3 Start building against Spring Integration 5.1.3 snapshots
See gh-15866
2019-02-07 12:42:09 +00:00
Andy Wilkinson 245d3cf9f4 Start building against Spring AMQP 2.1.4 snapshots
See gh-15865
2019-02-07 12:41:28 +00:00
Andy Wilkinson 96cf7b1e64 Start building against Spring Data Lovelace-SR5 snapshots
See gh-15864
2019-02-07 12:40:49 +00:00
Andy Wilkinson 333fe77f58 Start building against Spring Security 5.1.4 snapshots
See gh-15863
2019-02-07 12:40:11 +00:00
Andy Wilkinson 1f4927b65d Start building against Spring Framework 5.1.5 snapshots
See gh-15862
2019-02-07 12:39:33 +00:00
Stephane Nicoll b169406bbe Polish contribution
Closes gh-15853
2019-02-06 09:14:06 +01:00
Kedar Joshi b43718c360 Polish
See gh-15853
2019-02-06 09:13:53 +01:00
Andy Wilkinson ecb7e240eb Merge branch '2.1.x' 2019-02-05 12:33:19 +00:00
Andy Wilkinson 59c66eaf41 Correct documented path for locked synchronizer's identity hashcode
Closes gh-15847
2019-02-05 12:30:46 +00:00
Andy Wilkinson ebcc53a9b7 Include tasks with custom triggers in scheduledtasks endpoint output
Closes gh-15815
2019-02-05 12:12:07 +00:00
Andy Wilkinson 89bf486d0c Merge branch '2.1.x' 2019-02-05 11:39:37 +00:00
Andy Wilkinson 1f67707509 Fix cast in TestRestTemplateContextCustomizer
Closes gh-15843
2019-02-05 11:39:25 +00:00
Andy Wilkinson b3abd25e22 Merge branch '2.1.x' 2019-02-05 11:11:07 +00:00
Andy Wilkinson 8a7958ef55 Do not use reflection to fall back to JDKs jar URLStreamHandler
Closes gh-15844
2019-02-05 10:59:32 +00:00
Andy Wilkinson 45cc649c7d Merge branch '2.1.x' 2019-02-04 12:36:33 +00:00
Andy Wilkinson 82bc87560c Use AssertJ’s exception assertions rather than fail
Closes gh-15761
2019-02-04 11:48:26 +00:00
Stephane Nicoll a84a6c34ba Merge branch '2.1.x' 2019-02-02 20:22:22 +01:00
Stephane Nicoll 9357a92503 Add reference to Codecentric's SOAP Web Services starter 2019-02-02 20:21:57 +01:00
Andy Wilkinson 342bced125 Merge branch '2.1.x' 2019-02-01 13:48:02 +00:00
Andy Wilkinson 2650a07dc9 Leave module-info.class in root of archive when repackaging
Closes gh-15810
2019-02-01 13:47:42 +00:00
Stephane Nicoll 5269ea5536 Polish contribution
Closes gh-15754
2019-01-31 16:33:38 +01:00
Johnny Lim 6603033bbc Polish SessionConfigurationImportSelector.selectImports()
See gh-15754
2019-01-31 16:33:02 +01:00
Stephane Nicoll 002fa405a8 Merge branch '2.1.x' 2019-01-31 16:26:37 +01:00
Stephane Nicoll ede23caace Polish "Inject Map directly rather than via ObjectProvider"
Closes gh-15798
2019-01-31 16:25:18 +01:00
ayudovin 3a2e85ce75 Inject Map directly rather than via ObjectProvider
See gh-15798
2019-01-31 16:24:18 +01:00
Stephane Nicoll c5675de666 Polish "Handle AccessControlException in JspTemplateAvailabilityProvider"
Closes gh-15778
2019-01-31 16:21:48 +01:00
ayudovin 81273bdf9a Handle AccessControlException in JspTemplateAvailabilityProvider
See gh-15778
2019-01-31 16:20:19 +01:00
Stephane Nicoll 5e2d5959f3 Polish 2019-01-29 15:56:48 +01:00
dreis2211 5b3e1aa21a Optimize ConfigurationPropertyName
This commit changes the iteration order when checking for element
equality. This is based on the educated guess that child elements
will likely differ while parents will probably be the same.

E.g. comparing "spring.banner.charset" with "spring.banner.location"
will now first check "charset" against "location" and thus saves some
cycles for elements that will be the same.

See gh-15782
2019-01-28 11:39:40 +00:00
Andy Wilkinson 0e77445a9a Polish "Optimize BeanPropertyName.toDashedForm()"
See gh-15779
2019-01-28 11:37:55 +00:00
dreis2211 3c8d9d00e5 Optimize BeanPropertyName.toDashedForm()
See gh-15779
2019-01-28 11:37:49 +00:00
Andy Wilkinson 47b378e373 Derive StringBuilder's size from number of elements
Previously, when ConfigurationPropertyName was building the String
returned from toString() it would use a StringBuilder with the
default initial capacity of 16. For properties with several
elements this was likely to be too small resulting in the builder's
buffer being resized.

This commit sizes the StringBuilder as a multiple of the number of
elements in the name, attempting to strike a balance between
allocating a StringBuilder with an initial capacity that's too
large and wastes memory and an initial capacity that's too small
and requires resizing.

See gh-15760
2019-01-28 11:34:28 +00:00
Andy Wilkinson 39e2aaa41c Size the ElementsParser based on expected number of elements
Previously, the ElementsParser would be created using its default
capacity of 6 even when parsing a String that is expected to
produce a single element.

This commit updates ConfigurationPropertyName to create an
ElementsParser with a capacity of 1 when parsing a String that should
contain only a single element.

See gh-15760
2019-01-28 11:34:28 +00:00
Andy Wilkinson 8ec6c372e4 Do not expand ElementsParser until size equals storage length
Previously, ElementsParser would expand its internal storage when the
size of the storage was <= the end index of the element being parsed,
irrespective of how many elements had been stored. This led to
expansion of the storage, even for a source that contains a single
element, if the end of the element was at an index greater than the
size of the storage.

This commit updates ElementsParser to resize its storage when the size
(the number of elements that have been stored) is equal to the size of
the storage.

See gh-15760
2019-01-28 11:34:28 +00:00
Andy Wilkinson 2956b86035 Avoid creating ConfigurationPropertyName just to get its Elements
See gh-15760
2019-01-28 11:34:28 +00:00
dreis2211 d4ab101223 Use Assertions.contentOf() where possible
Closes gh-15793
2019-01-28 10:08:57 +01:00
Stephane Nicoll 342212b8dc Merge branch '2.1.x' 2019-01-28 10:08:02 +01:00
Stephane Nicoll 6f86a84301 Polish "Alias auto-configured `TaskExecutor` to make async tasks use it"
Closes gh-15748
2019-01-28 10:04:30 +01:00
Camille Vienot d0859f1569 Alias auto-configured `TaskExecutor` to make async tasks use it
See gh-15748
2019-01-28 09:59:55 +01:00
Stephane Nicoll a6815bb2c9 Merge branch '2.1.x' 2019-01-25 10:45:26 +01:00
Vedran Pavic d7550d73a3 Remove duplicate code from HealthWebEndpointResponseMapper
Closes gh-15784
2019-01-25 10:38:16 +01:00
Andy Wilkinson babe98f064 Merge branch '2.1.x' 2019-01-22 11:54:05 +00:00
Andy Wilkinson a172e146de Polish "Always fail fast when SSL is enabled without a key store"
Closes gh-15709
2019-01-22 11:51:29 +00:00
Raheela 62c8ac6ee8 Always fail fast when SSL is enabled without a key store
See gh-15709
2019-01-22 11:50:19 +00:00
Andy Wilkinson 2cb147af7c Merge branch '2.1.x' 2019-01-22 09:22:17 +00:00
Andy Wilkinson e15e140f8c Polish "Fix typos in JsonContentAssert failure messages"
See gh-15752
2019-01-22 09:19:41 +00:00
Johnny Lim 3744082996 Fix typos in JsonContentAssert failure messages
Closes gh-15752
2019-01-22 09:19:25 +00:00
Andy Wilkinson f23a0a5969 Inject InfoContributorProperties more precisely
Closes gh-15750
2019-01-21 16:56:39 +00:00
Andy Wilkinson 530c7bee71 Do not auto-configure HttpMessageConverters in reactive web apps
Closes gh-15712
2019-01-18 14:57:14 -05:00
Andy Wilkinson 6abd18ae96 Do not auto-configure RestTemplateBuilder in reactive web apps
Closes gh-15718
2019-01-18 14:50:24 -05:00
Andy Wilkinson 5d60d6bd62 Use ApplicationContextRunner to test RestTemplateAutoConfiguration 2019-01-18 14:36:18 -05:00
Andy Wilkinson 7dd65074e8 Only perform background pre-init with multiple processors
Closes gh-15722
2019-01-18 11:50:17 -05:00
Stephane Nicoll 32b14f3098 Merge branch '2.1.x' 2019-01-17 16:15:32 -05:00
Stephane Nicoll f0a20b1821 Polish contribution
Closes gh-15733
2019-01-17 16:14:15 -05:00
NAIT BELKACEM 6a0053c8bc Fix typo
See gh-15733
2019-01-17 16:11:11 -05:00
Michael McFadyen 9eeeebcd53 Update 'HTTP Client Metrics' reference documentation
Since gh-#5594, the 'outcome' tag has been introduced for
HTTP clients. This commit updates the reference documentation
accordingly.

Closes gh-15725
2019-01-17 12:14:42 -05:00
Stephane Nicoll cea6a79e49 Merge branch '2.1.x' 2019-01-17 10:58:55 -05:00
Stephane Nicoll 708ca0636f Clarify that Spring Boot uses the platform MBeanServer by default
Closes gh-15728
2019-01-17 10:58:08 -05:00
Stephane Nicoll 33f2bd4d61 Merge branch '2.1.x' 2019-01-14 08:13:37 -05:00
Stephane Nicoll 485bdc9901 Polish "Remove redundant interface modifiers"
Closes gh-15694
2019-01-14 08:13:08 -05:00
igor-suhorukov 2d873c78fe Remove redundant interface modifiers
See gh-15694
2019-01-14 08:12:41 -05:00
Stephane Nicoll 6baa6b291e Polish contribution
Closes gh-15695
2019-01-14 08:11:20 -05:00
Johnny Lim af3ed9ff9f Polish
See gh-15695
2019-01-14 08:09:32 -05:00
Phillip Webb 2f77ef7722 Merge branch '2.1.x' 2019-01-11 16:45:05 -08:00
Phillip Webb 72400d3a96 Upgrade to Spring Batch 4.1.1
Closes gh-15659
2019-01-11 16:43:35 -08:00
Phillip Webb 9e58942698 Update copyright year for changed files 2019-01-11 16:42:02 -08:00
Phillip Webb 6a901199f5 Polish 2019-01-11 16:42:02 -08:00
Andy Wilkinson 023c7159ac Upgrade to Spring Batch 4.0.2.RELEASE
Closes gh-15658
2019-01-11 16:21:35 +00:00
Andy Wilkinson d22e43aefb Merge branch '2.1.x' 2019-01-11 16:07:18 +00:00
Andy Wilkinson f0141dadab Revert "Upgrade to Glassfish Jaxb 2.3.2"
This reverts commit 6b952f5b65.

See gh-15689
2019-01-11 16:07:03 +00:00
Andy Wilkinson f8de67e6e9 Merge branch '2.1.x' 2019-01-11 14:35:14 +00:00
Andy Wilkinson 6b952f5b65 Upgrade to Glassfish Jaxb 2.3.2
Closes gh-15689
2019-01-11 14:32:38 +00:00
Andy Wilkinson 48b485161e Upgrade to Byte Buddy 1.9.7
Closes gh-15688
2019-01-11 14:32:37 +00:00
Andy Wilkinson eb96cdffd2 Upgrade to Reactor Bom Californium-SR4
Closes gh-15687
2019-01-11 14:32:36 +00:00
Andy Wilkinson c5e14afcd1 Upgrade to Micrometer 1.1.2
Closes gh-15686
2019-01-11 14:32:35 +00:00
Andy Wilkinson 1bd030c17a Upgrade to Spring Kafka 2.1.12.RELEASE
Closes gh-15685
2019-01-11 14:29:28 +00:00
Andy Wilkinson 6c81eb0591 Merge branch '2.1.x' 2019-01-11 13:26:54 +00:00
Andy Wilkinson 99df485268 Merge branch '2.0.x' into 2.1.x 2019-01-11 13:26:47 +00:00
Andy Wilkinson 2af133084a Merge branch '1.5.x' into 2.0.x 2019-01-11 13:25:54 +00:00
Andy Wilkinson 784f192cf3 Merge branch '2.1.x' 2019-01-11 10:34:48 +00:00
Andy Wilkinson 6307cb5943 Disable Tomcat’s reference clearing
Closes gh-15101
2019-01-11 10:34:14 +00:00
Johnny Lim 498eef5abb Add starter entry for Azure Application Insights
Closes gh-15628
2019-01-11 08:36:44 +01:00
Stephane Nicoll 8d1d3fb087 Polish "Avoid string concatenation inside StringBuilder append()"
Closes gh-15589
2019-01-11 08:30:12 +01:00
igor-suhorukov 59ac85d371 Avoid string concatenation inside StringBuilder append()
See gh-15589
2019-01-11 08:28:19 +01:00
Stephane Nicoll 29a45a7b7b Merge branch '2.1.x' 2019-01-11 08:20:48 +01:00
Stephane Nicoll e95a6e8c5c Upgrade to Spring Kafka 2.2.3
Closes gh-15414
2019-01-11 08:19:16 +01:00
Stephane Nicoll c18a0756ac Upgrade to Spring Session Bean-SR2
Closes gh-15531
2019-01-11 08:18:11 +01:00
Stephane Nicoll def5c15a14 Upgrade to Spring Security 5.1.3
Closes gh-15417
2019-01-11 08:17:27 +01:00
Stephane Nicoll 211d7aee5d Upgrade to Spring Integration 5.1.2
Closes gh-15413
2019-01-11 08:16:48 +01:00
Stephane Nicoll 3fe3ff7be6 Upgrade to Spring AMQP 2.1.3
Closes gh-15407
2019-01-11 08:16:04 +01:00
Stephane Nicoll 89fcb8b381 Upgrade to Spring Session Apple-SR8
Closes gh-15530
2019-01-11 08:13:39 +01:00
Stephane Nicoll aaadc620da Upgrade to Spring Security 5.0.11
Closes gh-15416
2019-01-11 08:12:47 +01:00
Stephane Nicoll 3c917bc80f Upgrade to Spring Integration 5.0.11
Closes gh-15412
2019-01-11 08:11:25 +01:00
Stephane Nicoll e1c2eb04e0 Upgrade to Spring AMQP 2.0.11
Closes gh-15406
2019-01-11 08:10:03 +01:00
Madhura Bhave 2ab0925222 Merge branch '2.1.x' 2019-01-10 13:04:42 -08:00
Madhura Bhave b345fc8574 Fix validation when key matching the prefix is set
Fixes gh-15597
2019-01-10 13:04:12 -08:00
Andy Wilkinson b9d2fab70c Upgrade to Reactor Bom Bismuth-SR15
Closes gh-15676
2019-01-10 15:42:10 +00:00
Stephane Nicoll da96c122ad Merge branch '2.1.x' 2019-01-10 14:24:17 +01:00
Stephane Nicoll 7529179d39 Upgrade to Spring Data Lovelace SR4
Closes gh-15410
2019-01-10 14:22:59 +01:00
Stephane Nicoll f562806744 Merge branch '2.1.x' 2019-01-10 13:39:07 +01:00
Stephane Nicoll 8722d02c1e Merge branch '2.0.x' into 2.1.x 2019-01-10 13:38:34 +01:00
Stephane Nicoll c8c047d3d8 Upgrade to Spring Data Kay SR13
Closes gh-15409
2019-01-10 13:32:28 +01:00
Stephane Nicoll a697d641e7 Upgrade to Neo4j Ogm 3.1.6
Closes gh-15671
2019-01-10 13:30:36 +01:00
Stephane Nicoll dca6879d4e Polish "Remove an unused interface in RestarterTests"
Closes gh-15666
2019-01-10 13:25:34 +01:00
Johnny Lim d7f0c1d63c Remove an unused interface in RestarterTests
See gh-15666
2019-01-10 13:25:14 +01:00
Stephane Nicoll badccc083e Merge branch '2.1.x' 2019-01-10 10:29:18 +01:00
Stephane Nicoll cdf76e34a9 Merge branch '2.0.x' into 2.1.x 2019-01-10 10:26:40 +01:00
Stephane Nicoll 44dc29901b Upgrade to Micrometer 1.0.9
Closes gh-15669
2019-01-10 10:21:15 +01:00
Stephane Nicoll 9a35a037a9 Upgrade to Spring Web Services 3.0.6.RELEASE
Closes gh-15667
2019-01-10 10:20:17 +01:00
Stephane Nicoll 28f89773ce Merge branch '2.1.x' 2019-01-09 15:09:58 +01:00
Stephane Nicoll 5a5367591a Upgrade to Spring Framework 5.1.4.RELEASE
Closes gh-15493
2019-01-09 14:41:05 +01:00
Stephane Nicoll e28b802775 Upgrade to Spring Framework 5.0.12.RELEASE
Closes gh-15528
2019-01-09 14:39:59 +01:00
Brian Clozel a3737cd76d Merge branch '2.1.x' 2019-01-08 21:45:54 +01:00
Brian Clozel 958e08c413 Merge branch '2.0.x' into 2.1.x 2019-01-08 21:45:41 +01:00
dreis2211 95e26ffcb9 Avoid uri tag explosion when use of path variable is undetected
This commit aligns the Spring WebFlux instrumentation on Spring MVC
since gh-12447.
From now on, if the best matching path pattern is not found,
the recorded uri tag will be "UNKNOWN".

Note that for WebFlux.fn, the pattern information is properly
recorded as of SPR-17395.

Closes gh-15609
2019-01-08 21:45:06 +01:00
Brian Clozel d5ae59dad7 Polish
Closes gh-15594
2019-01-08 18:58:48 +01:00
Nishant Raut 21df40b6c7 Add an outcome tag to web client metrics
Similar to what's ben done in gh-15420 for Spring MVC and Spring
WebFlux, this commit adds an outcome tag for the client side on both
`RestTemplate` and `WebClient`.

See gh-15594
2019-01-08 18:57:05 +01:00
Brian Clozel a83d9635af Merge branch '2.1.x' 2019-01-08 16:13:35 +01:00
Brian Clozel 6200a319f2 Polish
Closes gh-15385
2019-01-08 16:13:18 +01:00
ayudovin e9588ca04b Support server.connection-timeout for Netty server 2019-01-08 16:03:08 +01:00
Brian Clozel ead9b51c9b Merge branch '2.1.x' 2019-01-08 14:26:37 +01:00
Brian Clozel c40e61c117 Merge branch '2.0.x' into 2.1.x 2019-01-08 14:26:03 +01:00
Brian Clozel 0e13fd039d Configure HTTP compression for HTTP/2 with Tomcat
This commit ensures that the compression options are also applied on the
`Http2Protocol` when http/2 is enabled with Tomcat.

Closes gh-15591
2019-01-08 14:14:10 +01:00
Stephane Nicoll 2b304e3d69 Merge branch '2.1.x' 2019-01-08 11:31:17 +01:00
Stephane Nicoll ca7f338a39 Polish "Remove redundant throws Exception"
Closes gh-15647
2019-01-08 11:27:28 +01:00
Stephane Nicoll 5ea9ac0ac6 Merge branch '2.1.x' 2019-01-08 11:14:32 +01:00
Stephane Nicoll 02581c005a Polish "Fix typo"
Closes gh-15642
2019-01-08 11:12:05 +01:00
Michael Simons 7a2313892c Fix typo
See gh-15642
2019-01-08 11:11:34 +01:00
Stephane Nicoll 5fdcb219bb Merge branch '2.1.x' 2019-01-08 10:42:48 +01:00
小呆 e5b2aeb5da Remove redundant throws Exception
Closes gh-15645
2019-01-08 10:42:11 +01:00
Brian Clozel 06bdb422b5 Upgrade to Reactor Californium-BUILD-SNAPSHOT 2019-01-07 18:42:27 +01:00
Stephane Nicoll 2dd3171b89 Merge branch '2.1.x' 2019-01-07 17:19:27 +01:00
Stephane Nicoll 4670770da9 Merge branch '2.0.x' into 2.1.x 2019-01-07 17:18:47 +01:00
Stephane Nicoll 7330b8b16f Upgrade to Hibernate Validator 6.0.14.Final
Closes gh-15639
2019-01-07 17:16:01 +01:00
Stephane Nicoll 448f1626f9 Merge branch '2.1.x' 2019-01-07 14:56:18 +01:00
Stephane Nicoll 830da28b8c Fix JPA bootstrap executor detection with multiple candidates
Spring Boot provides two separate auto-configurations that can
potentially expose an `AsyncTaskExecutor` implementation so relying on
the presence of a single instance is too weak.

This commit fixes the detection of the AsyncTaskExecutor that can be
used to bootstrap JPA so that a single instance is used and, in the case
more than one exists, the one named `applicationTaskExecutor`.

Closes gh-15447
2019-01-07 14:54:59 +01:00