Commit Graph

13018 Commits

Author SHA1 Message Date
Stephane Nicoll dd9e705afb Upgrade to OAuth2 OIDC SDK 7.1.3
Closes gh-25969
2021-04-09 14:02:37 +02:00
Stephane Nicoll 877bc6d7e6 Upgrade to Netty tcNative 2.0.38.Final
Closes gh-25968
2021-04-09 14:02:36 +02:00
Stephane Nicoll 4eb20f4298 Upgrade to Netty 4.1.63.Final
Closes gh-25967
2021-04-09 14:02:35 +02:00
Stephane Nicoll 6a76ecfbc8 Upgrade to Neo4j OGM 3.2.21
Closes gh-25966
2021-04-09 14:02:33 +02:00
Stephane Nicoll 2ea065a6cf Upgrade to MongoDB 4.0.6
Closes gh-25965
2021-04-09 14:02:32 +02:00
Stephane Nicoll d2117b6b3f Upgrade to MIMEPull 1.9.14
Closes gh-25964
2021-04-09 14:02:31 +02:00
Stephane Nicoll cccb1332b3 Upgrade to Micrometer 1.5.12
Closes gh-25963
2021-04-09 14:02:29 +02:00
Stephane Nicoll f58cda7b53 Upgrade to Maven Invoker Plugin 3.2.2
Closes gh-25962
2021-04-09 14:02:28 +02:00
Stephane Nicoll 7ccebf5fb3 Upgrade to Lombok 1.18.20
Closes gh-25961
2021-04-09 14:02:27 +02:00
Stephane Nicoll 030af053ec Upgrade to Jetty 9.4.39.v20210325
Closes gh-25960
2021-04-09 14:02:26 +02:00
Stephane Nicoll e70590ecb8 Upgrade to Jetty Reactive HTTPClient 1.1.7
Closes gh-25959
2021-04-09 14:02:24 +02:00
Stephane Nicoll 7b61e0cad2 Upgrade to Jaybird 3.0.11
Closes gh-25958
2021-04-09 14:02:23 +02:00
Stephane Nicoll 894a4379f1 Upgrade to Jakarta Mail 1.6.7
Closes gh-25957
2021-04-09 14:02:22 +02:00
Stephane Nicoll 79679ff314 Upgrade to Hibernate 5.4.30.Final
Closes gh-25956
2021-04-09 14:02:21 +02:00
Stephane Nicoll 741d60563f Upgrade to Dropwizard Metrics 4.1.19
Closes gh-25955
2021-04-09 14:02:19 +02:00
Stephane Nicoll d599b0c558 Upgrade to Byte Buddy 1.10.22
Closes gh-25954
2021-04-09 14:02:18 +02:00
Stephane Nicoll bffa26fefa Upgrade to AppEngine SDK 1.9.88
Closes gh-25953
2021-04-09 14:02:17 +02:00
Stephane Nicoll d50e581403 Start building against Micrometer 1.7.0-RC1 snapshots
See gh-25934
2021-04-09 13:44:32 +02:00
Stephane Nicoll 555a3a79cb Start building against Spring WS 3.1.0-RC1 snapshots
See gh-25933
2021-04-09 13:40:17 +02:00
Stephane Nicoll 1f357f62cf Start building against Spring Session 2021.0.0-RC1 snapshots
See gh-25932
2021-04-09 13:40:17 +02:00
Stephane Nicoll fee62c41b9 Start building against Spring Security 5.5.0-RC1 snapshots
See gh-25931
2021-04-09 13:40:17 +02:00
Stephane Nicoll 03f2054984 Start building against Spring Kafka 2.7.0 snapshots
See gh-25930
2021-04-09 13:40:17 +02:00
Stephane Nicoll 3ee6a945ec Start building against Spring Data 2021.0.0 snapshots
See gh-25928
2021-04-09 12:43:14 +02:00
Stephane Nicoll 6bf6136aaf Upgrade to Jedis 3.6.0-RC1
Closes gh-25950
2021-04-09 12:43:13 +02:00
Stephane Nicoll b4ca1b9112 Start building against Spring HATEOAS 1.3.0 snapshots
See gh-25927
2021-04-09 08:57:16 +02:00
Stephane Nicoll 4290e0792b Start building against Spring Framework 5.3.6 snapshots
See gh-25926
2021-04-09 08:56:37 +02:00
Phillip Webb 7a636e5c08 Update @Timed WebFlux documentation
Closes gh-23112
2021-04-08 23:15:44 -07:00
Phillip Webb 15fe41868e Polish 'Support @Timed annotation for WebFlux'
Extract common method logic to a `HandlerMethodTimedAnnotations`
utility class and also add some caching. Also move the test code
into a single class.

See gh-23112
2021-04-08 23:01:21 -07:00
anshlykov 4ff4a9b082 Support @Timed annotation for WebFlux
Update `MetricsWebFilter` to support `@Timed` annotations on the WebFlux
handler methods or beans.

See gh-23112
2021-04-08 23:00:08 -07:00
Phillip Webb 7056a95ffc Polish 'Support system-dependent path separators'
See gh-24490
2021-04-08 20:49:02 -07:00
mederel f918a46ea2 Support system-dependent path separators
Update `StandardConfigDataLocationResolver` so that it recognizes
both `/` and `File.separator` suffixes as directories.

Prior to this commit, working with directories on Windows was awkward
since the path separator is `\`. If a directory were specified in the
form `c:\config\`, an exception was raised complaining it did not end
with '/'.

See gh-24490
2021-04-08 20:42:35 -07:00
Phillip Webb 6ad100eae6 Short circuit already covered property sources
Add an alternative `PropertySourcesPropertyResolver` that can short
circuit resolution of properties that are already covered by the
`ConfigurationPropertySourcesPropertySource`.

Prior to this commit, calling `getProperty` or `containsProperty` on an
`Environment` that has `ConfigurationPropertySources` attached could
result in two identical calls to the underlying source. The first call
would be via the adapted source, and the second would be direct. Since
we can now plug-in a custom `PropertySourcesPropertyResolver` to the
`Environment`, we can optimize resolution so that calls happen only
once.

Closes gh-17400
2021-04-08 20:29:54 -07:00
Phillip Webb 1d302f4c63 Add customer Application Environment subclasses
Add custom `ApplicationEnvironment`, `ApplicationServletEnvironment`
and `ApplicationReactiveWebEnvironment` subclasses for use with
`SpringApplication`. The subclasses all disable the resolution of
active and default profiles using properties since this is handled
directly by the `ConfigDataEnvironmentPostProcessor`.

Closes gh-24892
See gh-24890
2021-04-08 20:29:48 -07:00
Phillip Webb d938dd97bf Add with/without methods to ConfigData.Options
Add convenience methods to ConfigData.Options to allow new Options
instances to be created with options excluded or included.

See gh-25766
2021-04-08 13:21:14 -07:00
Scott Frederick 86303c017b Merge branch '2.4.x'
Closes gh-25938
2021-04-08 13:03:45 -05:00
Scott Frederick 9108b81bb2 Merge branch '2.3.x' into 2.4.x
Closes gh-25937
2021-04-08 13:03:26 -05:00
Scott Frederick 0ad7f76263 Preserve file permissions in images built by Gradle
This commit copies the file mode along with other attributes when
copying files from the source archive to the build container while
building an image using the Gradle plugin. This preserves file
permissions on any resources included in the source archive.

Fixes gh-25915
2021-04-08 12:56:41 -05:00
Brian Clozel 0929048bb4 Link build tools docs version properties section
Closes gh-25935
2021-04-08 18:18:11 +02:00
Stephane Nicoll 5aa1e683c0 Start building against Spring Session 2020.0.4 snapshots
See gh-25912
2021-04-08 18:02:04 +02:00
Stephane Nicoll 0f53663cf6 Start building against Spring Security 5.4.6 snapshots
See gh-25911
2021-04-08 18:02:03 +02:00
Stephane Nicoll aa8f5433ee Start building against Spring Data 2020.0.8 snapshots
See gh-25910
2021-04-08 18:02:03 +02:00
Stephane Nicoll f1b2db03e0 Start building against Spring Framework 5.3.6 snapshots
See gh-25909
2021-04-08 18:02:03 +02:00
Brian Clozel b4d2207902 Merge branch '2.4.x'
Closes gh-25936
2021-04-08 17:45:42 +02:00
Brian Clozel a0ee0601ef Fix SSL configuration with Reactor Netty
Prior to this commit, the SslServerCustomizer would use a Reactor Netty
API that lets users customize the SSL configuration, but later override
some of the choices with defaults.

This commits moves from the new deprecated Reactor Netty API and instead
uses a new variant that builds the defaults and lets developers override
them if they want to.

Fixes gh-25913
2021-04-08 17:09:31 +02:00
Stephane Nicoll b52902e92a Merge branch '2.4.x'
Closes gh-25923
2021-04-08 10:14:03 +02:00
Stephane Nicoll c6205f10f1 Merge branch '2.3.x' into 2.4.x
Closes gh-25922
2021-04-08 10:13:45 +02:00
Stephane Nicoll 25b7495d8e Polish "Properly close input streams when loading key stores"
See gh-25884
2021-04-08 09:25:03 +02:00
Alex Belyaev 1e3f5c342b Properly close input streams when loading key stores
See gh-25884
2021-04-08 09:21:58 +02:00
Phillip Webb e4164d0143 Fix package tangle in endpoint package
Fix package tangle in the actuator endpoint package by relocating a
few classes.

The `Producible` and `ProducibleOperationArgumentResolver` classes have
been moved from `endpoint.annotation` to `endpoint` since they aren't
directly tied to annotations.

The `ApiVersion` class has been moved from `endpoint.http` to
`endpoint` since it needs to implement `Producible` and isn't really
tied to HTTP.

Closes gh-25914
2021-04-07 16:54:37 -07:00
Phillip Webb e766c8b3a7 Revert "Switch default MVC path matching strategy"
This reverts commit ab8e599cfe.

See gh-24805
2021-04-07 15:17:02 -07:00
Phillip Webb ab8e599cfe Switch default MVC path matching strategy
Change the default `spring.mvc.pathmatch.matching-strategy` to
`PATH_PATTERN_PARSER`.

Closes gh-24805
2021-04-07 11:02:45 -07:00
Phillip Webb 455864bfa0 Allow 'servet.path' with path pattern parser
Remove the restriction previously prevented `spring.mvc.servlet.path`
from being combined with a `spring.mvc.pathmatch.matching-strategy`
of `PATH_PATTERN_PARSER`. Spring Framework supports this combination
as of v5.3.4.

See gh-24805
2021-04-07 10:59:55 -07:00
Stephane Nicoll 2a60503849 Start building against Spring Session Dragonfruit-SR3 snapshots
See gh-25907
2021-04-07 15:43:12 +02:00
Stephane Nicoll e4bf730f0b Start building against Spring Security 5.3.9 snapshots
See gh-25906
2021-04-07 15:42:42 +02:00
Stephane Nicoll b12a725977 Start building against Spring Data Neumann-SR9 snapshots
See gh-25905
2021-04-07 15:42:07 +02:00
Stephane Nicoll 80e893ebae Upgrade to Spring HATEOAS 1.1.5
Closes gh-25904
2021-04-07 15:41:34 +02:00
Stephane Nicoll aab5859fde Start building against Spring Framework 5.2.14 snapshots
See gh-25903
2021-04-07 15:41:17 +02:00
Stephane Nicoll ac1117f1a1 Start building against Reactor Reactor Dysprosium-SR19
See gh-25902
2021-04-07 15:40:40 +02:00
Andy Wilkinson 4d31182123 Polish "Add detection of Azure App Service to CloudPlatform"
See gh-25829
2021-04-07 12:34:54 +01:00
Julien Dubois 98a1017ee7 Add detection of Azure App Service to CloudPlatform
See gh-25829
2021-04-07 12:34:49 +01:00
Andy Wilkinson 8b5f914ba5 Revert "Merge branch '2.4.x'"
This reverts commit 97b26b4886, reversing
changes made to 6f9b1ed6a3.

See gh-25840
2021-04-07 10:20:23 +01:00
Andy Wilkinson e9ce20dbf4 Revert "Merge branch '2.3.x' into 2.4.x"
This reverts commit 586ce00e06, reversing
changes made to 563b8a8cec.

See gh-25839
2021-04-07 10:19:20 +01:00
Andy Wilkinson b35d1ec6e8 Revert "Use test harness for image building integration tests"
This reverts commit da9d8d6055.

See gh-25838
2021-04-07 09:30:51 +01:00
Phillip Webb 72ccab0aad Fix WebSessionManager auto-configuration order
Auto-configure `SessionAutoConfiguration` before
`WebFluxAutoConfiguration` to ensure that the correct
`WebSessionManager` bean is created.

See gh-20970
2021-04-06 22:43:42 -07:00
Phillip Webb 807ea1af0d Update copyright year of changed files 2021-04-06 14:59:52 -07:00
Phillip Webb 4b05dbf4a2 Polish 2021-04-06 14:59:13 -07:00
Andy Wilkinson 1994219399 Polish "Add config props for keep-alive timeout and max keep-alive reqs"
See gh-25815
2021-04-06 20:32:18 +01:00
Parviz Rozikov 34b94d8898 Add config props for keep-alive timeout and max keep-alive reqs
See gh-25815
2021-04-06 20:32:18 +01:00
Brian Clozel dc6b5badb8 Add SameSite session cookie config property for WebFlux
This commit adds a new `spring.webflux.session.cookie.same-site`
confuguration property that sets the default value for the "SameSite"
attribute in the WebFlux session cookies.

Closes gh-20970
2021-04-06 21:29:47 +02:00
Andy Wilkinson 73e1dd8728 Polish "Auto-configure Mongo metrics"
See gh-23990
2021-04-06 18:15:09 +01:00
bono007 81c18214d1 Auto-configure Mongo metrics
See gh-23990
2021-04-06 16:58:39 +01:00
Andy Wilkinson ef986b13e5 Polish Quartz endpoint documentation
See gh-10364
2021-04-06 16:56:17 +01:00
Stephane Nicoll b11602aeaa Polish "Add Quartz actuator endpoint"
This commit reworks the initial proposal so that jobs and triggers are
treated as first class concepts.

`/actuator/quartz` now returns the group names for jobs and triggers.

`actuator/quartz/jobs` returns the job names, keyed by the available
group names, while `/actuator/quartz/triggers` does the same for
triggers.

`/actuator/jobs/{groupName}` provides an overview of a job group. It
provides a map of job names with the class name of the job.
implementation

`/actuator/triggers/{groupName}` provides an overview of a trigger
group. There are five supported trigger implementations: cron, simple,
daily time interval, calendar interval, and custom for any other
implementation. Given that each implementation has specific settings,
triggers are split in five objects.

`/actuator/jobs/{groupName}/{jobName}` provides the full details of a
particular job. This includes a sanitized data map and a list of
triggers ordered by next fire time.

`/actuator/triggers/{groupName}/{triggerName}` provides the full details
of a particular trigger. This includes the state, its type, and a
dedicate object containing implementation-specific settings.

See gh-10364
2021-04-06 12:13:28 +02:00
Vedran Pavic 9795061360 Add Quartz actuator endpoint
See gh-10364
2021-04-06 11:36:54 +02:00
Andy Wilkinson 095ff18854 Test our Gradle plugin against Gradle 7.0-rc-2
Closes gh-25888
2021-04-06 10:30:35 +01:00
Phillip Webb a99f78c62f Merge branch '2.4.x' 2021-04-05 18:19:27 -07:00
Phillip Webb 8a04547454 Fix checkstyle violation
See gh-25766
2021-04-05 18:18:52 -07:00
Phillip Webb c6cd5117d4 Merge branch '2.4.x'
Closes gh-25887
2021-04-05 17:24:02 -07:00
Phillip Webb 5774ea3f0c Support profile specific ConfigData imports
Update the `ConfigData` import support to allow individual property
sources to be imported with a higher precedence than profile specific
imports.

Prior to this commit, imported sources would always have a higher
precedence than the file that imported them, but a lower precedence
than any profile-specific variant of the same file.

For example, given an `application.properties` that imports `myconfig`,
the contributor tree would be as follows:

	ROOT
	 +- `application.properties`
	 |    +- myconfig
	 +- `application-<profile>.properties`

The precedence would be:

	1) `application-<profile>.properties`
	2) myconfig
	3) `application.properties`

This works well for most situations, but can be confusing if import is
for a profile-specific property source. For example:

	ROOT
	 +- `application.properties`
	 |    +- myconfig
	 |    +- myconfig-<profile>
	 +- `application-<profile>.properties`

Results in the order precedence of:

	1) `application-<profile>.properties`
	2) myconfig-<profile>
	3) myconfig
	4) `application.properties`

This means that whilst `myconfig` overrides `application.properties`,
`myconfig-profile` does not override `application-<profile>.properties`.

For this specific situation, the preferable order would be:

	1) myconfig-<profile>
	2) `application-<profile>.properties`
	3) myconfig
	4) `application.properties`

To support this alternative ordering a new `PROFILE_SPECIFIC` config
data option has been added. Additionally, options may now be specified
on a per-source basis by using the `PropertySourceOptions` interface.

Fixes gh-25766
2021-04-05 15:55:03 -07:00
Stephane Nicoll d578e20b2d Merge branch '2.4.x'
Closes gh-25883
2021-04-05 09:10:56 +02:00
Tommy Ludwig 3746385f98 Polish HealthIndicators table in docs
`=======` was showing up in the header of the table, which should not
be there.

See gh-25882
2021-04-05 09:10:25 +02:00
Stephane Nicoll dd916f908f Merge branch '2.4.x'
Closes gh-25880
2021-04-04 11:19:13 +02:00
Stephane Nicoll db3dfffdca Polish contribution
See gh-25875
2021-04-04 11:15:49 +02:00
izeye 852e5778a3 Polish
See gh-25875
2021-04-04 11:12:03 +02:00
Brian Clozel 72a1eb6384 Allow to manually tag request metrics with exceptions
Prior to this commit, some exceptions handled at the controller or
handler function level would:

* not bubble up to the Spring Boot error handling support
* not be tagged as part of the request metrics

This situation is inconsistent because in general, exceptions handled at
the controller level can be considered as expected behavior.
Also, depending on how the exception is handled, the request metrics
might not be tagged with the exception.
This will be reconsidered in gh-23795.

This commit prepares a transition to the new situation. Developers can
now opt-in and set the handled exception as a request attribute. This
well-known attribute will be later read by the metrics support and used
for tagging the request metrics with the exception provided.

This mechanism is automatically used by the error handling support in
Spring Boot.

Closes gh-24028
2021-04-01 21:09:46 +02:00
Andy Wilkinson 66e9619d65 Merge branch '2.4.x'
Closes gh-25870
2021-04-01 19:21:31 +01:00
Andy Wilkinson 0005263f76 Merge branch '2.3.x' into 2.4.x
Closes gh-25869
2021-04-01 19:01:28 +01:00
Andy Wilkinson 1b91c1706e Ensure that Cassandra's DriverConfigLoader is only closed once
Fixes gh-25796
2021-04-01 18:57:35 +01:00
Andy Wilkinson 029f1b52b3 Merge branch '2.4.x'
Closes gh-25867
2021-04-01 16:51:42 +01:00
Andy Wilkinson ba28f21e27 Merge branch '2.3.x' into 2.4.x
Closes gh-25866
2021-04-01 16:51:31 +01:00
Andy Wilkinson cbf37b3a8b Use main as the branch name in info endpoint example
Closes gh-25865
2021-04-01 16:46:37 +01:00
Andy Wilkinson cbfeb18e6a Merge branch '2.4.x'
Closes gh-25864
2021-04-01 15:36:01 +01:00
Andy Wilkinson d82889f42e Merge branch '2.3.x' into 2.4.x
Closes gh-25863
2021-04-01 15:00:51 +01:00
Andy Wilkinson cf0bd0f959 Polish "Fix no such bean definition with ancestor-defined Validator"
See gh-25800
2021-04-01 15:00:10 +01:00
MatejNedic 8958101510 Fix no such bean definition with ancestor-defined Validator
See gh-25800
2021-04-01 14:59:50 +01:00
Andy Wilkinson 6a7de18101 Merge branch '2.4.x'
Closes gh-25862
2021-04-01 10:25:29 +01:00
Andy Wilkinson d1359220ed Merge branch '2.3.x' into 2.4.x
Closes gh-25861
2021-04-01 10:07:59 +01:00
Andy Wilkinson 7d632ea397 Use ApplicationContextRunner in ValidationAutoConfigurationTests
Closes gh-25859
2021-04-01 10:01:37 +01:00
Andy Wilkinson 7aabd8bf2d Ensure that class proxying is forced before AutoProxyCreator is created
Previously, using @EnableGlobalMethodSecurity would cause the
AutoProxyCreator to be created before the AOP auto-configuration had
called AopUtils.forceAutoProxyCreatorToUseClassProxying. Forcing
auto proxy creation changes the AutoProxyCreator's bean definition
so it has no effect when attempted after the creator has been created.

This commit updates the AOP auto-configuration to use a
BeanFactoryPostProcessor to force the use of class proxying. This
ensures that the changes to the auto proxy creator's bean definition
are in place before any bean creation has been performed.

Fixes gh-25413
2021-03-31 20:29:28 +01:00
Scott Frederick 5595fb2423 Polish "Extract XML examples from Maven plugin adoc files"
See gh-25534
2021-03-31 14:05:11 -05:00
robert-smith-911 4e287594bf Extract XML examples from Maven plugin adoc files
See gh-25534
2021-03-31 14:05:10 -05:00
Andy Wilkinson 03e92d794b Merge branch '2.4.x'
Closes gh-25845
2021-03-31 17:29:33 +01:00
Andy Wilkinson 0e4b66a3ea Merge branch '2.3.x' into 2.4.x
Closes gh-25844
2021-03-31 17:29:11 +01:00
Andy Wilkinson 1a84b0610e Align PushGatewayManager's exception handling with PushMeterRegistry's
Previously, would log an error for any exception and also stop
publishing for an UnknownHostException. By constrast, Micrometer's
PushMeterRegistry treats all exceptions the same, logging a warning
and continuing with subsequent push attempts.

This commit updates the push gateway manager's behaviour to match
PushMeterRegistry. UknownHostExceptions no longer receive special
treatment and push (and delete) failures are now logged as warnings
rather than errors.

Fixes gh-25804
2021-03-31 17:01:08 +01:00
Scott Frederick 97b26b4886 Merge branch '2.4.x'
Closes gh-25840
2021-03-30 21:00:38 -05:00
Scott Frederick 586ce00e06 Merge branch '2.3.x' into 2.4.x
Closes gh-25839
2021-03-30 17:39:10 -05:00
Scott Frederick da9d8d6055 Use test harness for image building integration tests
This commit modifies the integration tests for the Maven and Gradle
image building goal and task to use a custom builder as a test harness
to verify that the plugins invoke the builder as expected.

Fixes gh-25838
2021-03-30 16:48:28 -05:00
Andy Wilkinson 6f9b1ed6a3 Merge branch '2.4.x'
See gh-25837
2021-03-30 20:52:38 +01:00
Andy Wilkinson 563b8a8cec Merge branch '2.3.x' into 2.4.x
See gh-25836
2021-03-30 20:52:15 +01:00
Andy Wilkinson e94f8bba62 Ensure that upstream jars have been built
See gh-25835
2021-03-30 20:51:33 +01:00
Andy Wilkinson df4b1ffb0d Merge branch '2.4.x'
Closes gh-25837
2021-03-30 20:42:41 +01:00
Andy Wilkinson 38a4f135a9 Merge branch '2.3.x' into 2.4.x
Closes gh-25836
2021-03-30 20:42:29 +01:00
Andy Wilkinson ca9a619259 Defer processing of zipTree source until execution time
Closes gh-25835
2021-03-30 20:41:46 +01:00
Andy Wilkinson 09173b81d6 Merge branch '2.4.x'
Closes gh-25833
2021-03-30 18:18:36 +01:00
Andy Wilkinson 7a846ad41f Merge branch '2.3.x' into 2.4.x
Closes gh-25832
2021-03-30 18:18:10 +01:00
Andy Wilkinson 5a086321c6 Polish "Document Failsafe configuration when not using starter parent"
See gh-25621
2021-03-30 18:16:21 +01:00
robert-smith-911 0d79fd3e01 Document Failsafe configuration when not using starter parent
See gh-25621
2021-03-30 18:02:12 +01:00
Phillip Webb 8c31d29acf Merge branch '2.4.x' 2021-03-30 09:29:59 -07:00
Phillip Webb a28a3ae090 Merge branch '2.3.x' into 2.4.x 2021-03-30 09:25:46 -07:00
Phillip Webb 9c8a97809d Consistent use of @deprecated since
Restore the patch version number for consistency with `@since`
tags.

See gh-25808
2021-03-30 09:20:30 -07:00
Brian Clozel fe1011c23d Add Netty memory leak detection config property
This commit adds a new `spring.netty.leak-detection` configuration
property that selects the level of memory leak detection for the Netty
engine.

This configuration is applied statically to Netty; this means all
(non-shaded) Netty usages as client or server will be impacted by this
change.

Developers might use this property during development or tests to find
causes of memory leaks when dealing with Netty buffers.

Closes gh-14338
2021-03-30 18:05:25 +02:00
Andy Wilkinson 66e857f2c5 Merge branch '2.4.x'
See gh-25826
2021-03-30 09:25:42 +01:00
Andy Wilkinson d9ce30b15c Merge branch '2.3.x' into 2.4.x
See gh-25825
2021-03-30 09:23:24 +01:00
Andy Wilkinson 8b6eef6f1d Consistent use of @deprecated since
See gh-25808
2021-03-30 09:22:45 +01:00
Phillip Webb 4ad87a861d Restore deprecated JobLauncherCommandLineRunner
Restore the deprecated `JobLauncherCommandLineRunner` class and extend
removal until 2.6. The class is still needed by spring-cloud-task.

Closes gh-25807
2021-03-29 15:56:38 -07:00
Phillip Webb c9451b59f2 Merge branch '2.4.x' 2021-03-29 15:51:23 -07:00
Phillip Webb a0f5169966 Polish 2021-03-29 15:51:13 -07:00
Phillip Webb 44b1751bb4 Merge branch '2.4.x'
Closes gh-25826
2021-03-29 15:48:20 -07:00
Phillip Webb 363f5829d1 Merge branch '2.3.x' into 2.4.x
Closes gh-25825
2021-03-29 15:46:50 -07:00
Phillip Webb 26dd1b9a26 Update deprecations with for removal targets
Update all deprecation tags to include a removal target.

Closes gh-25808
2021-03-29 15:44:58 -07:00
Andy Wilkinson f3c9cc85cb Polish
See gh-25818
2021-03-29 20:39:36 +01:00
Brian Clozel 61573fbf14 Record server metrics for cancelled connections
Prior to this commit, the Actuator instrumentation for WebFlux servers
would not record metrics in two cases:

* the client disconnects before the response has been sent
* a server timeout is triggered before the response is sent

This commit improves the existing instrumentation to record metrics in
these cases. Since the causes of timeouts/disconnections can vary a lot,
the chosen "outcome" tag for metrics is "UNKNOWN".

Closes gh-23606
2021-03-29 21:31:18 +02:00
Andy Wilkinson 9b65409e23 Generalize database initialization detection and include R2DBC
Closes gh-25818
2021-03-29 20:07:54 +01:00
Andy Wilkinson 22b02a6c6f Merge branch '2.4.x'
Closes gh-25823
2021-03-29 14:39:17 +01:00
Andy Wilkinson a025f3d252 Merge branch '2.3.x' into 2.4.x
Closes gh-25822
2021-03-29 14:38:38 +01:00
Andy Wilkinson 896f20e1d3 Improve diagnostics of ClassPathFileSystemWatcherTests
Closes gh-25821
2021-03-29 14:37:25 +01:00
Stephane Nicoll 9087c24713 Merge branch '2.4.x'
See gh-25820
2021-03-29 14:38:57 +02:00
Stephane Nicoll 8bb4020bd4 Polish
See gh-25819
2021-03-29 14:36:26 +02:00
Andy Wilkinson 676713be3f Merge branch '2.4.x'
Closes gh-25820
2021-03-29 13:01:02 +01:00
Andy Wilkinson 403e747c46 Use constructor injection in SpringBootRepositoryRestConfigurer
Closes gh-25819
2021-03-29 13:00:02 +01:00
Andy Wilkinson e49a88cb9b Auto-configure script-based R2DBC database initialization
See gh-24741
2021-03-29 12:01:19 +01:00
Andy Wilkinson 9cc7f0b54d Generalize script-based DB initialization and add R2DBC initializer
See gh-24741
2021-03-29 11:51:02 +01:00
Andy Wilkinson eb1200415d Derive a ConnectionFactoryBuilder from an existing ConnectionFactory
Closes gh-25788
2021-03-29 09:17:05 +01:00
Stephane Nicoll 870d9b191a Merge branch '2.4.x'
Closes gh-25813
2021-03-27 08:06:21 +01:00
Stephane Nicoll d1aaee46bb Merge branch '2.3.x' into 2.4.x
Closes gh-25812
2021-03-27 08:06:02 +01:00
dreis2211 be4491959b Fix flaky QuartzAutoConfigurationTests
See gh-25810
2021-03-27 08:00:52 +01:00
Scott Frederick 269fc68c1d Merge branch '2.4.x'
Closes gh-25811
2021-03-26 16:43:13 -05:00
Scott Frederick 4015d70f00 Merge branch '2.3.x' into 2.4.x
Closes gh-25789
2021-03-26 15:16:01 -05:00
dreis2211 a9a37f0dd5 Increase test coverage on Java 16
See gh-25809
2021-03-26 19:38:54 +00:00
Scott Frederick 3ad5f1013a Fix Maven image building with classifiers
Fixes gh-25736
2021-03-26 11:36:38 -05:00
Andy Wilkinson 340893747b Merge branch '2.4.x'
Closes gh-25799
2021-03-25 15:50:45 +00:00
Andy Wilkinson af7e4e211c Support all known endpoint types
Previously, the configuration metadata annotation processor only
declared support for `@Endpoint` and none of the other more
specialized `@…Endpoint` annotations that are meta-annotated with
`@Endpoint` such as `@WebEndpoint` and `@JmxEndpoint. This would
result in missing metadata if a full or incremental build only
compiled classes annotated with one of the more specialized
`@…Endpoint` annotations as the annotation processor would not be
called.

This commit updates the processor's supported annotation types to
include every known `@…Endpoint` annotation. The test processor has
also been similarly updated to align its behaviour with that of the
main processor.

Fixes gh-25388
2021-03-25 15:23:09 +00:00
Andy Wilkinson 759e5cb5f5 Polish indentation 2021-03-25 09:40:37 +00:00
Phillip Webb 8da82d2d36 Merge branch '2.4.x'
Closes gh-25790
2021-03-24 14:11:34 -07:00
Phillip Webb 35aeae5a4f Deprecate Bootstrapper
Deprecate the `Bootstrapper` interface entirely and provide a
`BootstrapRegistryInitializer` alternative so that people can migrate.

Unfortunately our previous attempt to fix the typo in the `Bootstrapper`
interface didn't provide us a way to remove the deprecated method
without impacting users. It was also problematic for people who were
implementing `Bootstrapper` rather than using a lambda since they needed
to introduce the deprecated method.

We unfortunately can't see a way to fix the original typo without
introducing a new interface.

Fixes gh-25735
2021-03-24 14:10:12 -07:00
Phillip Webb 02a6de4498 Merge branch '2.4.x'
Closes gh-25787
2021-03-24 12:53:06 -07:00
Phillip Webb ddf5c9f5d1 Merge branch '2.3.x' into 2.4.x
Closes gh-25786
2021-03-24 12:52:51 -07:00
Phillip Webb 88b74097ba Polish 'Ignore quality value when removing MediaType.ALL'
See gh-25778
2021-03-24 12:35:56 -07:00
Fábio Ramon 3090a3a71f Ignore quality value when removing MediaType.ALL
Update the default reactive exception handler so that `MediaType.ALL`
is removed regardless of any quality setting. Prior to this commit,
the "match-all" media type was not properly ignored if it has a quality
value and would show HTML content if the accept header was
`application/json, */*;q=0.9`.

See gh-25778
2021-03-24 12:35:32 -07:00
Phillip Webb 38584f0694 Merge branch '2.4.x'
Closes gh-25785
2021-03-24 12:24:14 -07:00
Phillip Webb 5274cf2459 Merge branch '2.3.x' into 2.4.x
Closes gh-25784
2021-03-24 12:23:44 -07:00
Phillip Webb 130cc5b036 Chain caught InvalidEndpointRequestExceptions
Update `AbstractWebMvcEndpointHandlerMapping` to chain any caught
InvalidEndpointRequestExceptions so that a more complete stacktrace
is available. The exception has also been updated to a
`ResponseStatusException` so that the reason can be propagated.

Fixes gh-25642
2021-03-24 12:22:26 -07:00
Andy Wilkinson 90b4ced7a6 Move DataSource init auto-config out of DataSourceAutoConfiguration
Previously, the auto-configuration for DataSource initialization and
the properties used to configure it were part of the general
DataSource auto-configuration and properties.

This commit moves the auto-configuration of DataSource initialization
out into a separate top-level auto-configuration class. Similarly,
the properties for configuring DataSource initialization have been
moved from `spring.datasource.*` into `spring.sql.init.*`.

The old initialization-related `spring.datasource.*` properties have
been deprecated but can still be used. When they are used, they new,
separate initialization auto-configuration will back off. In other
words, the initialization related `spring.datasource.*` properties
and the `spring.sql.init.*` properties cannot be used in combination.

Closes gh-25323
2021-03-24 14:57:29 +00:00
Andy Wilkinson e2811ace72 Improve testing of optional schema and data scripts
See gh-25487
2021-03-24 12:33:56 +00:00
Andy Wilkinson 5758a5aa39 Rename DDL/DML script location properties
See gh-25756
2021-03-24 12:20:36 +00:00
Stephane Nicoll 36b63eec4b Polish "Expose Spring Integration global properties"
See gh-25377
2021-03-24 11:03:26 +01:00
Artem Bilan e2df9bce84 Expose Spring Integration global properties
Spring Integration comes with some global properties which can be
configured via `META-INF/spring.integration.properties`. The framework
then provides an `integrationGlobalProperties` bean as an
`org.springframework.integration.context.IntegrationProperties`
instance.

This commit allows users to configure these using regular
`application.properties`. If a `META-INF/spring.integration.properties`
file exists, the values are used as fallback.

See gh-25377
2021-03-24 11:03:26 +01:00
Phillip Webb deaff1a522 Merge branch '2.4.x'
Closes gh-25775
2021-03-23 17:08:18 -07:00
Phillip Webb ca9fae6b47 Merge branch '2.3.x' into 2.4.x
Closes gh-25774
2021-03-23 17:07:44 -07:00
Phillip Webb ec21202d54 Delete unpacked jars when the JVM exits
Update `JarFileArchive` so that any unpacked files are now deleted when
the JVM exits.

Closes gh-25773
2021-03-23 17:06:56 -07:00
Phillip Webb 05f61bccea Align unpack logic with Files.createTempDirectory
Update `JarFileArchive` to align the way that it creates temp files and
folders with the way that `Files.createTempDirectory` works.

Closes gh-25772
2021-03-23 17:06:56 -07:00
Phillip Webb b8873578ca Add missing @Deprecated annotations 2021-03-23 17:06:53 -07:00
Phillip Webb b8fdb442b0 Merge branch '2.4.x' 2021-03-23 13:09:36 -07:00
Phillip Webb 9af6c895c9 Merge branch '2.3.x' into 2.4.x 2021-03-23 13:09:25 -07:00
Phillip Webb 2b591387b8 Restore tomcat-embed TldPatterns
Restore tomcat-embed-core-* and tomcat-embed-logging-* patterns which
were inadvertently removed in commit 0ec8d281ef.

See gh-25764
2021-03-23 13:07:15 -07:00
Phillip Webb 77ddb45704 Merge branch '2.4.x' 2021-03-23 12:53:59 -07:00
Phillip Webb 11a94ee6f0 Merge branch '2.3.x' into 2.4.x 2021-03-23 12:52:07 -07:00
Phillip Webb 82127fdaa3 Update copyright year of changed files 2021-03-23 12:50:49 -07:00
Phillip Webb 985e5a4340 Merge branch '2.4.x'
Closes gh-25771
2021-03-23 12:49:59 -07:00
Phillip Webb 56674b9031 Merge branch '2.3.x' into 2.4.x
Closes gh-25770
2021-03-23 12:48:51 -07:00
Phillip Webb 0ec8d281ef Align TldPatterns with Tomcat default
Update `TldPatterns` to align with the latest default shipped by Tomcat.
This commit also introduces a test to ensure that we will remain aligned
going forwards.

Closes gh-25764
2021-03-23 12:46:27 -07:00
Andy Wilkinson 5e3d5ebe21 Merge branch '2.4.x'
Closes gh-25769
2021-03-23 14:48:49 +00:00
Andy Wilkinson 96ba9ae47f Merge branch '2.3.x' into 2.4.x
Closes gh-25768
2021-03-23 14:48:24 +00:00
Andy Wilkinson 62023104de Test auto-configured MockRestServiceServer with metrics and a root URI
Closes gh-25741
2021-03-23 14:37:37 +00:00
Andy Wilkinson ce3dfc5792 Merge branch '2.4.x'
Closes gh-25767
2021-03-23 13:42:15 +00:00
Stephane Nicoll db782f5013 Add environment prefix support to SpringApplicationBuilder
Closes gh-25740
2021-03-23 14:25:03 +01:00
Andy Wilkinson 33cf8b3bc4 Merge branch '2.3.x' into 2.4.x
Closes gh-25765
2021-03-23 13:06:35 +00:00
Andy Wilkinson bf6f36a783 Apply any root URI to RestTemplate metric's URI tag
Previously, a root URI configured via RestTemplateBuilder's rootUri
method and RootUriTemplateHandler was not taken into account when
generated the URI tag for RestTemplate request metrics.

This commit updates MetricsClientHttpRequestInterceptor to be aware
of RootUriTemplateHandler and capture the URI template once the
root URI has been applied.

Fixes gh-25744
2021-03-23 13:05:54 +00:00
Andy Wilkinson f0a8c02efd Provide a constant for graceful shutdown's smart lifecyle phase
In order to provide a single constant for graceful shutdown's smart
lifecycle, this commit replaces the package-private reactive and
servlet-specific implementations with a single public implementation
that can be used by both web stacks. This new public implementation
provides a constant for its smart lifecycle phase.

Closes gh-24255
2021-03-23 11:11:26 +00:00
Andy Wilkinson ca46fe7cd0 Test our Gradle plugin against Gradle 7.0-rc-1
Closes gh-25763
2021-03-23 10:41:43 +00:00
Andy Wilkinson 5dee68c925 Move script-based DataSource initializer into spring-boot
Closes gh-25487
Closes gh-25756
2021-03-22 20:14:30 +00:00
Andy Wilkinson fa336bb565 Move DataSource dependency detection into dedicated package
Closes gh-25757
2021-03-22 14:23:14 +00:00
Stephane Nicoll a900306b17 Merge branch '2.4.x'
Closes gh-25755
2021-03-22 14:46:37 +01:00
Stephane Nicoll 2ecae2df77 Merge branch '2.3.x' into 2.4.x
Closes gh-25754
2021-03-22 14:44:48 +01:00
Stephane Nicoll c2f452a87a Polish "Take JPA database action into account when setting ddlAuto"
See gh-25129
2021-03-22 14:41:25 +01:00
bono007 674b01cb06 Take JPA database action into account when setting ddlAuto
See gh-25129
2021-03-22 13:53:28 +01:00
Andy Wilkinson 64f9d8d4fe Deprecate support for Mustache's Environment fallback
Closes gh-21045
2021-03-22 11:45:01 +00:00
Scott Frederick 2dd4010eb0 Merge branch '2.4.x'
Closes gh-25701
2021-03-19 15:58:14 -05:00
Scott Frederick 6f860b441b Merge branch '2.3.x' into 2.4.x
Closes gh-25700
2021-03-19 14:52:20 -05:00
Andy Wilkinson fb670ee654 Drop support for Gradle 5.6.x
Closes gh-24225
2021-03-19 17:30:27 +00:00