Commit Graph

3934 Commits

Author SHA1 Message Date
Phillip Webb deb79425ee Polish 2023-10-19 21:47:13 -07:00
Phillip Webb d638bbb0ba Merge branch '3.1.x'
Closes gh-37967
2023-10-19 21:25:44 -07:00
Phillip Webb 1d456e09d2 Merge branch '3.0.x' into 3.1.x
Closes gh-37966
2023-10-19 21:12:52 -07:00
Phillip Webb a0b999c8b4 Merge branch '2.7.x' into 3.0.x
Closes gh-37965
2023-10-19 20:55:51 -07:00
Phillip Webb abdad1cabe Constently use assertThatExceptionOf... assertions
Closes gh-37964
2023-10-19 20:17:26 -07:00
Andy Wilkinson e25886f2de Consider checkpoint restoration when logging start time and uptime
Closes gh-37084
2023-10-19 19:54:58 +01:00
Andy Wilkinson af2e363252 Merge branch '3.1.x'
Closes gh-37942
2023-10-18 18:50:52 +01:00
Andy Wilkinson 226221073c Merge branch '3.0.x' into 3.1.x
Closes gh-37941
2023-10-18 18:39:29 +01:00
Andy Wilkinson a25472ab5b Merge branch '2.7.x' into 3.0.x
Closes gh-37940
2023-10-18 18:39:16 +01:00
Andy Wilkinson 817debb1ee Fix constructor binding with conversion to custom collection type
Closes gh-37734
2023-10-18 17:47:26 +01:00
Andy Wilkinson 8d006f82f7 Merge branch '3.1.x'
Closes gh-37939
2023-10-18 17:46:19 +01:00
Andy Wilkinson 9219fdc638 Merge branch '3.0.x' into 3.1.x
Closes gh-37938
2023-10-18 17:44:30 +01:00
Andy Wilkinson 865203f902 Merge branch '2.7.x' into 3.0.x
Closes gh-37937
2023-10-18 17:37:37 +01:00
Andy Wilkinson 04307aa7e0 Polish "Support @Order on [CommandLine|Application]Runner @Bean definitions"
See gh-37905
2023-10-18 17:16:48 +01:00
Tadaya Tsuyukubo 8ac597c245 Support @Order on [CommandLine|Application]Runner @Bean definitions
Prior to this commit, `@Order` annotation on `@Bean` method was not
considered for `CommandLineRunner` and `ApplicationRunner`.

This commit introduces a `Runner` marker interface and uses it to
retrieve the runner beans. As a result, it enables the use of `@Order`
annotations on `@Bean` methods for both `CommandLineRunner` and
`ApplicationRunner`.

Signed-off-by: Tadaya Tsuyukubo <tadaya@ttddyy.net>

See gh-37905
2023-10-18 17:15:15 +01:00
Andy Wilkinson daa903ab31 Add filters to MockMvc with their init params and dispatcher types
Closes gh-37835
2023-10-17 17:54:36 +01:00
Andy Wilkinson 9f224ff136 Narrow the scope of 0e3a196 to Resource[] for array binding
See gh-15835
2023-10-16 18:18:34 +01:00
Andy Wilkinson 19fd88b25b Implement SSL hot reload for Netty and Tomcat
Closes gh-37808
2023-10-16 14:08:26 +01:00
Andy Wilkinson 0e3a196af5 Fix binding of classpath*: to resource arrays and collections
Fixes gh-15835
2023-10-16 11:28:35 +01:00
Andy Wilkinson 085e12aa93 Merge branch '3.1.x'
Closes gh-37884
2023-10-13 16:39:21 +01:00
Andy Wilkinson 0c1b5d1295 Merge branch '3.0.x' into 3.1.x
Closes gh-37883
2023-10-13 16:39:02 +01:00
Andy Wilkinson e314e11985 Fix AOT processing of @MultipartConfig annotated @WebServlet
Closes gh-37637
2023-10-13 16:22:38 +01:00
Moritz Halbritter fcf77ed65d Add property to stop the JVM from exiting
spring.main.keep-alive=true will spawn a non-daemon thread which stops
if the context is closed

Closes gh-37736
2023-10-12 17:02:47 +02:00
Phillip Webb b3ddec7793 Refactor Jetty SameSiteSupplier cookie support to use a Handler
Update `JettyServletWebServerFactory` so that the `SimeSiteSupplier`
support is handled using a `Handler` rather than a `HttpStream.Wrapper`.

Closes gh-37809
2023-10-10 15:57:32 -07:00
Andy Wilkinson 1d410dccea Adapt to breaking API change in Framework
See gh-37710
2023-10-10 17:21:33 +01:00
Andy Wilkinson 15ee305ef3 Upgrade to Jetty 12.0.2
Closes gh-37803
2023-10-10 16:42:35 +01:00
Moritz Halbritter 0a16ec17e9 Add property to enable key verification on PEM SSL bundles
Closes gh-37727
2023-10-05 09:49:49 +02:00
Phillip Webb fd9b2b114e Improve Tomcat performance when using nested jars
Add `NestedJarResourceSet` which can be used for nested jar URLs
and unlike the standard Tomcat implementation does not assume that
the JAR is backed by a single file.

Closes gh-37452
2023-10-03 17:27:57 -07:00
Andy Wilkinson 7d40a45b50 Merge branch '3.1.x'
Closes gh-37662
2023-10-03 11:21:29 +01:00
Andy Wilkinson a4100e12ff Merge branch '3.0.x' into 3.1.x
Closes gh-37661
2023-10-03 11:05:51 +01:00
Andy Wilkinson 931584f8af Merge branch '2.7.x' into 3.0.x
Closes gh-37659
2023-10-03 10:28:51 +01:00
Johnny Lim c9932bb73a Use AssertJ's fail, not JUnit's
This commit also updates Checkstyle to prevent use of JUnit's
assertions from being reintroduced.

See gh-37655
2023-10-03 10:11:12 +01:00
Andy Wilkinson d725914cd5 Merge branch '3.1.x'
Closes gh-37636
2023-09-29 18:36:25 +01:00
Andy Wilkinson 1e4deed8ce Merge branch '3.0.x' into 3.1.x
Closes gh-37635
2023-09-29 18:36:09 +01:00
Andy Wilkinson 458418be29 Automatically register reflection hints for scanned WebListeners
Closes gh-36008
2023-09-29 18:09:36 +01:00
Andy Wilkinson 145fb161a1 Merge branch '3.1.x'
Closes gh-37601
2023-09-27 12:50:58 +01:00
Andy Wilkinson 0368fc5678 Merge branch '3.0.x' into 3.1.x
Closes gh-37600
2023-09-27 12:38:21 +01:00
Andy Wilkinson 688a69b9b1 Prevent status messages from logging when Logback is being configured
There's a window where the deny-all turbo filter has been removed but
Logback has not yet been configured. If any logging that would have
reached an appender is performed in this window, unwanted status
messages will be logged. This window can be closed by ensuring that
the turbo filter is in place while Logback is being configured.

Closes gh-34505
2023-09-27 12:28:23 +01:00
Andy Wilkinson ab06d10d64 Fix checkpoint-restore with replaced or wrapped HikariDataSource
Closes gh-37580
2023-09-26 12:31:12 +01:00
Moritz Halbritter 11ec9f95f6 Merge branch '3.1.x'
Closes gh-37571
2023-09-25 11:40:16 +02:00
Moritz Halbritter 02f71d8e95 Merge branch '3.0.x' into 3.1.x
Closes gh-37570
2023-09-25 11:39:29 +02:00
Moritz Halbritter b93ce92022 Merge branch '2.7.x' into 3.0.x
Closes gh-37569
2023-09-25 11:39:18 +02:00
Moritz Halbritter b266ade00c Prevent exception when loading optional config data locations
Closes gh-35683
2023-09-25 11:39:04 +02:00
Moritz Halbritter 279f1e2d0f Merge branch '3.1.x'
Closes gh-37514
2023-09-21 16:44:22 +02:00
Moritz Halbritter ddd666497d Merge branch '3.0.x' into 3.1.x
Closes gh-37513
2023-09-21 16:44:14 +02:00
Moritz Halbritter dc8e69cc8d Merge branch '2.7.x' into 3.0.x
Closes gh-37512
2023-09-21 16:44:05 +02:00
Johnny Lim b95092c621 Fix wrong mocking
See gh-37492
2023-09-21 16:42:43 +02:00
Phillip Webb f55184a998 Update copyright year of changed files 2023-09-20 17:16:31 -07:00
Andy Wilkinson b87e47e90c Merge branch '3.1.x'
Closes gh-37485
2023-09-20 10:56:35 +01:00
Andy Wilkinson e10ca23b41 Merge branch '3.0.x' into 3.1.x
Closes gh-37484
2023-09-20 10:56:20 +01:00
Andy Wilkinson 2a3d5c4e0e Tolerate parallel init of SLF4J
Closes gh-37477
2023-09-20 10:49:01 +01:00
Moritz Halbritter d4fe3bfea7 Merge branch '3.1.x'
Closes gh-37446
2023-09-18 14:24:54 +02:00
Moritz Halbritter af244e1550 Start Threshold filters in DefaultLogbackConfiguration
Closes gh-36741
2023-09-18 14:11:09 +02:00
Moritz Halbritter 4c4fdb35e9 Merge branch '3.1.x' 2023-09-18 09:53:17 +02:00
Moritz Halbritter 3900c0ad58 Merge branch '3.0.x' into 3.1.x 2023-09-18 09:53:07 +02:00
Moritz Halbritter 9a1e146c86 Polish PrivateKeyParserTests 2023-09-18 09:51:39 +02:00
Moritz Halbritter 2367990150 Merge branch '3.1.x' 2023-09-18 09:49:52 +02:00
Moritz Halbritter 0ba928bf2d Polish PemPrivateKeyParserTests
Add tests for:
  - aes128 and aes256 encrypted keys
  - scrypt encrypted keys
  - des3 encrypted keys
  - encrypted EdDSA and XDH keys
2023-09-18 09:31:08 +02:00
Moritz Halbritter 7bd9780f71 Merge pull request #37436 from izeye
* pr/37436:
  Polish SimpleAsyncTaskExecutorBuilder

Closes gh-37436
2023-09-18 08:33:04 +02:00
Johnny Lim 9cb89e3366 Polish SimpleAsyncTaskExecutorBuilder
See gh-37436
2023-09-18 08:31:41 +02:00
Andy Wilkinson 6094212217 Defer accessing loop resources until web server start
Closes gh-37209
2023-09-15 17:49:44 +01:00
Moritz Halbritter 577e92a3ef Merge branch '3.1.x' 2023-09-15 15:39:58 +02:00
Moritz Halbritter 85e322b401 Merge branch '3.0.x' into 3.1.x 2023-09-15 15:39:41 +02:00
Moritz Halbritter 1b098951aa Merge branch '2.7.x' into 3.0.x 2023-09-15 15:39:28 +02:00
Moritz Halbritter 36629df416 Remove useless file 2023-09-15 15:39:18 +02:00
Moritz Halbritter f93a497cc6 Merge branch '3.1.x'
Closes gh-37423
2023-09-15 15:18:46 +02:00
Moritz Halbritter ed4b6aaa7b Merge branch '3.0.x' into 3.1.x
Closes gh-37422
2023-09-15 15:18:08 +02:00
Moritz Halbritter 5be826dd4a Merge branch '2.7.x' into 3.0.x
Closes gh-37413
2023-09-15 14:47:57 +02:00
Moritz Halbritter 408fb8ae9d Add support for EdDSA, XDH and RSA-PSS key parsing
This works with Java 17 and up. Also refactor the test for more
structure.

Closes gh-37237
2023-09-15 14:15:02 +02:00
Johnny Lim 8f4ccb0535 Polish
See gh-37393
2023-09-15 11:44:06 +01:00
Andy Wilkinson 7424e845d1 Merge branch '3.1.x'
Closes gh-37402
2023-09-15 10:46:56 +01:00
Andy Wilkinson c187bd928a Don't add runtime shutdown hook till app with hook enabled is run
Previously, the runtime shutdown hook was added as soon as a
shutdown handler was registered. This causes a memory leak in a war
deployment when the application is undeployed as
LoggingApplicationListener always registers a shutdown handler
so the runtime shutdown hook was always registered.

This commit updates the shutdown hook so that the runtime shutdown
hook is only allowed to be added once run() has been called on a
SpringApplication with the shutdown hook enabled. This approach
allows the registerShutdownHook flag on SpringApplication to be a
central point of control for the registration of the runtime shutdown
hook. When that flag is set to false, for example by
SpringBootServletInitializer, the runtime shutdown hook will not
be registered, irrespective of whether other code uses the public
API to add a shutdown handler.

An alternative approach of stopping LoggingApplicationListener from
adding its shutdown handler – for example by adding
logging.register-shutdown-hook=false to the environment – was
considered. This approach was rejected in favor of the centralized
approach described above as it would require every caller that adds
a shutdown handler to deal with the problem.

Closes gh-37096
2023-09-15 08:37:56 +01:00
Stephane Nicoll 4243456590 Fix deprecation in Spring Framework 2023-09-13 17:14:46 +02:00
Andy Wilkinson d7f44164d9 Merge branch '3.1.x' 2023-09-13 11:16:48 +01:00
Andy Wilkinson b9c223581e Merge branch '3.0.x' into 3.1.x
Closes gh-37364
2023-09-13 11:15:33 +01:00
Andy Wilkinson eba2f718a7 Merge branch '2.7.x' into 3.0.x
Closes gh-37363
2023-09-13 11:15:16 +01:00
Moritz Halbritter 13a3e3bdf0 Add TWENTY_ONE to JavaVersion
Closes gh-37362
2023-09-13 11:04:22 +01:00
Andy Wilkinson 8874cadebf Revert workaround for gh-18440
This reverts the main code changes from commit
b240c810a8. The tests are kept to
verify that the workaround is no longer required.

Closes gh-18591
2023-09-12 13:43:27 +01:00
Moritz Halbritter 8a1f6d4f32 Merge branch '3.1.x'
Closes gh-37335
2023-09-11 16:50:44 +02:00
Stephane Nicoll 24eadd70ed Adapt to Spring Framework API change
This commit adapts to API changes in Spring Framework, see
spring-projects/spring-framework#31117

Previously, the "autowired" executable to use for a bean was always
resolved, even if a custom code fragment didn't really need it. This
is key for binding of immutable configuration properties as we use an
instance supplier for it.

This changes means that the workaround added in maintenance releases
can be removed.

See gh-37337
2023-09-11 16:03:27 +02:00
Moritz Halbritter e2d84fa462 Make SslStoreBundle implementations immutable
Closes gh-37222
2023-09-11 15:39:25 +02:00
Stephane Nicoll 671b04e3e3 Merge branch '3.1.x'
Closes gh-37337
2023-09-11 15:37:53 +02:00
Stephane Nicoll c298091e34 Merge branch '3.0.x' into 3.1.x
Closes gh-37336
2023-09-11 15:37:43 +02:00
Stephane Nicoll 112e85507c Support AOT processing of Value Object with several constructors
Previously, AOT processing failed on processing an immutable
configuration properties that declare several constructors as the core
framework infrastructure tries to resolve the "autowired" constructor
to use, even if the custom code fragments are never going to use it.

This commit workarounds the problem in maintenance releases until a
proper fix is provided in the core framework. When AOT runs, a
SmartInstantiationAwareBeanPostProcessor is added to the bean factory
to provide the constructor to use. This implementation relies on the
same algorithm that the binder uses at runtime.

Closes gh-37283
2023-09-11 15:27:02 +02:00
Stephane Nicoll 1ffb580d6f Upgrade to Commons DBCP2 2.10.0
Closes gh-37312
2023-09-11 15:15:57 +02:00
Andy Wilkinson d8c3902a7e Polish 2023-09-08 14:56:18 +01:00
Andy Wilkinson 4bd8c350f2 Start building against Spring Framework 6.0.12 snapshots
See gh-37265
2023-09-08 14:14:06 +01:00
Andy Wilkinson ca254e51f6 Start building against Spring Framework 6.0.12 snapshots
See gh-37258
2023-09-08 12:07:43 +01:00
Andy Wilkinson ed5d16de84 Upgrade to Jetty 12
Closes gh-36073
2023-09-07 13:59:15 +01:00
Andy Wilkinson 02fd570b7d Start building against Spring Framework 6.1.0 snapshots
See gh-37231
2023-09-07 13:34:14 +01:00
Phillip Webb b1547d0139 Merge branch '3.1.x'
Closes gh-37171
2023-08-31 22:38:29 -07:00
Phillip Webb 37e67058b7 Merge branch '3.0.x' into 3.1.x
Closes gh-37169
2023-08-31 22:24:14 -07:00
Phillip Webb 71ed31343c Merge branch '2.7.x' into 3.0.x
Closes gh-37168
2023-08-31 22:01:06 -07:00
Phillip Webb fd8cb74b46 Load algorithm parameters from PEM encoded 'EC PRIVATE KEY' files
Update `PrivateKeyParser` implementations so that algorithm parameters
for PEM encoded 'EC PRIVATE KEY' files are loaded from the incoming
data.

Prior to this commit, the algorithm parameter was hard-coded to
'secp384r1' which could result in a mismatch to the actual file
content.

Fixes gh-34232
2023-08-31 21:40:11 -07:00
Andy Wilkinson 208dcb9305 Rename tests now that Jetty is preferred
Closes gh-37155
2023-08-31 11:06:54 +01:00
Andy Wilkinson f6c88662b4 Merge branch '3.1.x'
Closes gh-37144
2023-08-30 13:36:01 +01:00
Andy Wilkinson e6fcde4af5 Merge branch '3.0.x' into 3.1.x
Closes gh-37143
2023-08-30 13:35:40 +01:00
Andy Wilkinson a8e37b5cc5 Merge branch '2.7.x' into 3.0.x
Closes gh-37142
2023-08-30 13:34:12 +01:00
Andy Wilkinson 2de98a84bc Polish "Polish code and javadoc"
See gh-37112
2023-08-30 13:31:58 +01:00
hakan-krgn 6d9ce8a3b5 Polish code and javadoc
See gh-37112
2023-08-30 13:31:58 +01:00
Brian Clozel 49e0d17a9b Disable flaky reactor tests
See gh-36302
2023-08-22 11:38:26 +02:00
Stephane Nicoll c3558689c7 Merge branch '3.1.x'
Closes gh-37063
2023-08-22 10:35:41 +02:00
Stephane Nicoll 6780b80673 Merge branch '3.0.x' into 3.1.x
Closes gh-37062
2023-08-22 10:35:33 +02:00
Stephane Nicoll eed6e199fc Polish "Detect logback config location as xml if path ends with .xml"
See gh-37039
2023-08-22 10:33:03 +02:00
Yanming Zhou c9cc1da48e Detect logback config location as xml if path ends with .xml
See gh-37039
2023-08-22 10:06:29 +02:00
Brian Clozel d46a58f0f6 Configure Virtual Threads support in Reactor
This commit configures the virtual threads support in Reactor Core for
Schedulers if:
* the current JDK is 21 or higher
* the current environment enables this globally with the
  `"spring.threads.virtual.enabled"` property.

This needs to happen early in the application startup process, as this
feature is detected statically when the first schedulers call is made.
As a result, this is being done with an environment post processor and
not with an auto-configuration class.

Closes gh-36302
2023-08-21 16:43:41 +02:00
Stephane Nicoll 2ee1c1eeac Merge branch '3.1.x'
Closes gh-37023
2023-08-17 17:14:41 +02:00
Stephane Nicoll 958f92495d Merge branch '3.0.x' into 3.1.x
Closes gh-37022
2023-08-17 17:14:30 +02:00
Stephane Nicoll f3450fde7d Detect nested types that are not directly nested to the current type
This commit makes sure that sub-namespace that are defined in a flat
manner in a configuration properties are considered for runtime hints

Closes gh-36909
2023-08-17 17:07:27 +02:00
Stephane Nicoll 7043c82e6d Merge branch '3.1.x'
Closes gh-36970
2023-08-14 15:20:57 +02:00
Stephane Nicoll 5764525a60 Merge branch '3.0.x' into 3.1.x
Closes gh-36969
2023-08-14 15:20:50 +02:00
Stephane Nicoll fe12e75955 Merge branch '2.7.x' into 3.0.x
Closes gh-36968
2023-08-14 15:20:40 +02:00
Stephane Nicoll e043fe434a Update copyright year of changed file
See gh-36965
2023-08-14 15:13:32 +02:00
abaudat 3ad0e77db8 Align javadoc of AbstractFilterRegistrationBean#setDispatcherTypes
See gh-36965
2023-08-14 15:13:04 +02:00
Phillip Webb 8edec21a6f Update copyright year of changed files 2023-08-13 20:44:44 -07:00
Phillip Webb d73d8f8e4f Merge branch '3.1.x' 2023-08-13 19:15:56 -07:00
Phillip Webb 848a61a3a8 Merge branch '3.0.x' into 3.1.x 2023-08-13 18:50:33 -07:00
Phillip Webb a0089c5c76 Merge branch '2.7.x' into 3.0.x 2023-08-13 18:44:36 -07:00
Phillip Webb 46773dd5df Update copyright year of changed files 2023-08-13 18:19:05 -07:00
Phillip Webb 527b2f2cac Polish 2023-08-13 18:18:48 -07:00
Moritz Halbritter fbd3b65034 Refactor synchronized to Lock in ApplicationTemp
The synchronized guards an I/O operation. Additionally, this adds
double-checked locking to the path instance field.

See gh-36670
2023-08-10 11:34:18 +02:00
Moritz Halbritter bcee354f54 Refactor synchronized to Lock in ConfigTreePropertySource
The synchronized guards an I/O operation. This code path can be
triggered every time a user calls .getProperty() on the Environment.

See gh-36670
2023-08-10 11:27:04 +02:00
Moritz Halbritter 5b00d5f89b Auto-configure SimpleAsyncTaskScheduler when virtual threads are enabled
This auto-configures a new SimpleAsyncTaskSchedulerBuilder bean in the
context. This bean is configured to use virtual threads, if enabled.

SimpleAsyncTaskSchedulerCustomizers can be used to customize the built
SimpleAsyncTaskScheduler.

If virtual threads are enabled, the application task scheduler is
configured to be a SimpleAsyncTaskScheduler.

Adds a new configuration property spring.task.scheduling.simple
.concurrency-limit

Closes gh-36609
2023-08-09 13:43:08 +02:00
Andy Wilkinson bd0652f8db Merge branch '3.1.x'
Closes gh-36857
2023-08-09 12:07:33 +01:00
Andy Wilkinson 0c9e6268d5 Merge branch '3.0.x' into 3.1.x
Closes gh-36856
2023-08-09 12:01:00 +01:00
Andy Wilkinson f82f4d6b56 Merge branch '2.7.x' into 3.0.x
Closes gh-36855
2023-08-09 12:00:45 +01:00
Andy Wilkinson 694ff4f875 Include throwables from Logback errors when reporting invalid config
Closes gh-32562
2023-08-09 11:43:58 +01:00
Stephane Nicoll 38dbc644ae Add auto-configuration for JdbcClient
Closes gh-36579
2023-08-09 11:18:25 +02:00
Moritz Halbritter 4aaca291de Remove MD5 from RandomValuePropertySource
Before that change, we get 32 random bytes, and then used MD5 on them to
get a hex string. This removes the MD5, we now get 128 bits (output size
 of MD5) of random bytes directly.
2023-08-08 14:13:26 +02:00
Moritz Halbritter 7bb337aeb1 Polish tests 2023-08-08 13:12:47 +02:00
Moritz Halbritter ed9169501e Polish 2023-08-08 13:12:47 +02:00
Andy Wilkinson 41a69c870c Merge branch '3.1.x'
Closes gh-36787
2023-08-08 11:29:20 +01:00
Andy Wilkinson ed89272585 Merge branch '3.0.x' into 3.1.x
Closes gh-36786
2023-08-08 11:29:11 +01:00
Andy Wilkinson 34b2de3095 Merge branch '2.7.x' into 3.0.x
Closes gh-36785
2023-08-08 11:28:59 +01:00
Andy Wilkinson 35d3cdbe74 Fail more helpfully when schema or data location is a directory
Previously a schema or data locatio that was a directory would
result in an attempt being made to apply the directory listing as
SQL scripts. This would typically result in a hard to diagnose
failure due to the directory listing not being valid SQL.

This commit updates the initializer to ignore locations for
which the Resources is not readable. This works as Framework's
Resource abstraction does not consider directory resources to be
readable.

Closes gh-36386
2023-08-08 11:20:07 +01:00
Stephane Nicoll 85f74ba564 Merge branch '3.1.x'
Closes gh-36760
2023-08-04 16:07:48 +02:00
Stephane Nicoll ac1d8a3651 Merge branch '3.0.x' into 3.1.x
Closes gh-36759
2023-08-04 16:07:40 +02:00
Stephane Nicoll f8a5aff160 Merge branch '2.7.x' into 3.0.x
Closes gh-36758
2023-08-04 16:07:04 +02:00
Stephane Nicoll 1e5a72f1f8 Provide nested cause if datasource fails to provide DatabaseDriver
Closes gh-34728
2023-08-04 16:01:14 +02:00
Stephane Nicoll 05df721d51 Merge branch '2.7.x' into 3.0.x 2023-08-04 16:00:02 +02:00
Stephane Nicoll 97ce95c417 Polish "Upgrade to MariaDB 3.1.4"
See gh-36394
2023-08-04 15:58:32 +02:00
Stephane Nicoll 04d17a7903 Merge branch '3.1.x'
Closes gh-36736
2023-08-04 14:12:15 +02:00
Stephane Nicoll 2e37b0ae47 Merge branch '3.0.x' into 3.1.x
Closes gh-36735
2023-08-04 14:12:04 +02:00
Stephane Nicoll de632dd77b Merge branch '2.7.x' into 3.0.x
Closes gh-36734
2023-08-04 14:11:51 +02:00
Stephane Nicoll fd88024402 Add @since for JavaVersion values
Closes gh-36608
2023-08-04 14:09:12 +02:00
Moritz Halbritter 726d2e6678 Remove unnecessary synchronization
- on AtomicBoolean in SpringApplicationBuilder
- on SimpleFormatter
- in a private method in FileSystemWatcher which is always called in a
  synchronized block
- Replaced synchronized guarded HashMap with ConcurrentHashMap
2023-08-03 17:33:52 +02:00
Moritz Halbritter 1a8b8ce26e Revert "Revise synchronized blocks"
This reverts commit 497bbf9c2d.
2023-08-03 17:26:31 +02:00
Johnny Lim 677db72210 Add Javadoc since to a new constructor for PemSslStoreBundle
See gh-36693
2023-08-03 12:47:08 +02:00
Moritz Halbritter 9f5749832b Polish JettyWebServer 2023-08-03 09:23:48 +02:00
Moritz Halbritter 3515196c2b Add missing synchronization and remove unnecessary volatile 2023-08-03 09:23:48 +02:00
Moritz Halbritter 497bbf9c2d Revise synchronized blocks
- Replace synchronized with Lock when guarding long-running operations
- Remove unnecessary synchronization in FileSystemWatcher
- Replace HashMap with ConcurrentHashMap in Restarter
- Remove unnecessary locking on AtomicBoolean in
  SpringApplicationBuilder
- Remove unnecessary locking in SimpleFormatter

Closes gh-36670
2023-08-03 09:23:46 +02:00
Moritz Halbritter 7c5ec73724 Polish SimpleAsyncTaskExecutorBuilderTests 2023-08-02 10:51:10 +02:00
Scott Frederick 2e50d11d86 Add since attribute to @DeprecatedConfigurationProperty annotation
Closes gh-36482
2023-08-01 16:13:22 -05:00
Stephane Nicoll 191ac10009 Deprecate support for OkHttp
Closes gh-36632
2023-08-01 16:45:13 +02:00
Moritz Halbritter 51008a7d39 Add ThreadPoolTaskSchedulerBuilder and deprecate TaskSchedulerBuilder
Closes gh-36651
2023-08-01 10:32:58 +02:00
Moritz Halbritter e4c38e59a9 Implement SimpleAsyncTaskExecutorBuilder
The SimpleAsyncTaskExecutorBuilder can be used to create
SimpleAsyncTaskExecutor. It will be auto-configured into the context.
SimpleAsyncTaskExecutorCustomizer can be used to customize the built
SimpleAsyncTaskExecutor.

If virtual threads are enabled:
- SimpleAsyncTaskExecutor will use virtual threads
- SimpleAsyncTaskExecutorBuilder will be used as the application task
  executor

A new property 'spring.task.execution.simple.concurrency-limit' has been
added to control the concurrency limit of the SimpleAsyncTaskExecutor

Closes gh-35711
2023-07-31 14:08:00 +02:00
Moritz Halbritter 32c91af440 Add ThreadPoolTaskExecutorBuilder and deprecate TaskExecutorBuilder
Closes gh-36637
2023-07-31 11:51:17 +02:00
Andy Wilkinson f3d623bb1d Merge branch '3.1.x'
Closes gh-36635
2023-07-28 12:22:48 +01:00
Andy Wilkinson 65bc351847 Merge branch '3.0.x' into 3.1.x
Closes gh-36634
2023-07-28 12:22:36 +01:00
Andy Wilkinson 3e99118a48 Merge branch '2.7.x' into 3.0.x
Closes gh-36633
2023-07-28 12:22:21 +01:00
Johnny Lim 5a205dbfd1 Polish
See gh-36620
2023-07-28 11:35:33 +01:00
Andy Wilkinson 0191943be2 Merge branch '3.1.x'
Closes gh-36631
2023-07-28 11:32:12 +01:00
Andy Wilkinson 8f576c36a2 Merge branch '3.0.x' into 3.1.x
Closes gh-36630
2023-07-28 11:31:59 +01:00
Andy Wilkinson 81844c04c4 Merge branch '2.7.x' into 3.0.x
Closes gh-36629
2023-07-28 11:31:49 +01:00
rob-valor 4bbfc5e630 Correct RestTemplateBuilder#defaultHeader javadoc
Replace reactor.netty.http.client.HttpClientRequest with
org.springframework.http.client.ClientHttpRequest

See gh-36614
2023-07-28 11:30:46 +01:00
Yanming Zhou b1ac64c7e2 Harmonize Stream.collect() usage
use Stream.toList() or collect(Collectors.toSet()) where possible.

See gh-36509
2023-07-26 11:15:08 +02:00
Moritz Halbritter c6c8a0f8c8 Merge branch '3.1.x'
Closes gh-36585
2023-07-26 10:25:21 +02:00
Moritz Halbritter 2bc3d22d68 Merge branch '3.0.x' into 3.1.x
Closes gh-36584
2023-07-26 10:24:53 +02:00
Moritz Halbritter c187d96367 Merge branch '2.7.x' into 3.0.x
Closes gh-36583
2023-07-26 10:23:08 +02:00
Francisco Bento 307d6c0a97 Fix Tomcat SSL protocol warn message
See gh-36572
2023-07-26 10:21:43 +02:00
Johnny Lim 96c9915f12 Polish
See gh-36565
2023-07-26 10:00:56 +02:00
Andy Wilkinson b476d368db Polish "Make HikariDataSource participate in checkpoint-restore"
See gh-36422
2023-07-25 17:19:58 +01:00
Moritz Halbritter 6050fff078 Auto-configure observability for R2DBC
The new ConnectionFactoryDecorator can be used to decorate the
ConnectionFactory built by the ConnectionFactoryBuilder.

The new R2dbcObservationAutoConfiguration configures a
ConnectionFactoryDecorator to attach a ObservationProxyExecutionListener
to ConnectionFactories. This enables Micrometer Observations for R2DBC
queries.

Closes gh-33768
2023-07-25 17:01:55 +02:00
Stephane Nicoll 771a98b192 Merge branch '3.1.x'
Closes gh-36521
2023-07-24 13:25:10 +02:00
Stephane Nicoll f23cb1fa39 Merge branch '3.0.x' into 3.1.x
Closes gh-36520
2023-07-24 13:25:01 +02:00
Stephane Nicoll 3aeb853c63 Merge branch '2.7.x' into 3.0.x
Closes gh-36519
2023-07-24 13:24:40 +02:00
Stephane Nicoll cc77b8ace1 Polish contribution
See gh-36463
2023-07-24 13:14:01 +02:00
elevne d59cec9e01 Harmonize use of Stream in ConfigDataLocationBindHandler.onSuccess
See gh-36463
2023-07-24 13:06:47 +02:00
Christoph Dreis 343c9c6f7e Remove references to Atomikos and Bitronix
See gh-35562
2023-07-21 16:23:14 +01:00
Andy Wilkinson b5c404f938 Merge branch '3.1.x'
Closes gh-36449
2023-07-19 14:38:44 +01:00
Andy Wilkinson 4d6ee92e21 Merge branch '3.0.x' into 3.1.x
Closes gh-36448
2023-07-19 14:38:28 +01:00
Andy Wilkinson f145ca0c3c Fix reflection hint generation for properties nested in superclass
Fixes gh-36406
2023-07-19 14:37:52 +01:00
Stephane Nicoll 62c9936abf Merge branch '3.1.x'
Closes gh-36428
2023-07-17 15:25:10 +02:00
Stephane Nicoll bb16ed1245 Merge branch '3.0.x' into 3.1.x
Closes gh-36427
2023-07-17 15:24:58 +02:00
Stephane Nicoll 3586bfb629 Merge branch '2.7.x' into 3.0.x
Closes gh-36426
2023-07-17 15:22:43 +02:00
Stephane Nicoll 09e5d38348 Polish "Replace @CsvSource with @ValueSource where feasible"
See gh-36062
2023-07-17 15:16:27 +02:00
Yanming Zhou acb7acd5d9 Replace @CsvSource with @ValueSource where feasible
@ValueSource is more appropriate for single parameter.

See gh-36062
2023-07-17 15:16:26 +02:00
Stephane Nicoll 60df7e3bce Polish contribution
See gh-36251
2023-07-17 13:37:30 +02:00
Bernardo Bulgarelli bc2899c1ef Deprecate DelegatingApplicationContextInitializer and DelegatingApplicationListener
See gh-36251
2023-07-17 13:26:27 +02:00
Stephane Nicoll 783bfb62e2 Merge branch '3.1.x'
Closes gh-36420
2023-07-17 10:04:14 +02:00
Christoph Dreis 8321887d6a Fix typos
See gh-36306
2023-07-17 09:40:16 +02:00
Andy Wilkinson f60547c118 Merge branch '3.1.x'
Closes gh-36360
2023-07-12 12:00:26 +01:00
Andy Wilkinson 218f4f2679 Merge branch '3.0.x' into 3.1.x
Closes gh-36359
2023-07-12 12:00:11 +01:00
Andy Wilkinson 090802b11b Use existing value rather than deducing bind method
When there is an existing value, deducing the bind method may
incorrectly result in the use of constructor binding. This
results in a failure in the configuration properties
post-processor as it refuses to bind properties to a bean whose
attributes indicate that constructor binding should have been used.

This commit updates ConfigurationPropertiesBean to avoid tryin to
deduce the bind method and instead use the presence or absence of an
existing value to determine the type of binding that should be used.
Only when there is no existing value is constructor binding
appropriate.

Fixes gh-36175
2023-07-12 11:13:48 +01:00
Andy Wilkinson f4e05c91c7 Use converter beans in preference to ObjectToObjectConverter
Previously, with the converter beans in a conversion service that
appears after the bean factory's conversion service, they would not
be called for a conversion that could be handled by the
ObjectToObjectConverter in the bean factory's conversion service.

This commit creates a new FormattingConversionService that is empty
except for the converter beans and places it first in the list.
It's followed by the bean factory's conversion service. The shared
application conversion service is added to the end of the list to
pick up any conversions that the previous two services could not
handle. This should maintain backwards compatibility with the
previous arrangement where the converter beans were added to an
application conversion service that went after the bean factory's
conversion service.

Fixes gh-34631
2023-07-07 08:33:15 +01:00
Spencer Gibb 62674de472
Skip int conversion in ClientHttpRequestFactories
@poutsma added `JdkClientHttpRequestFactory.setReadTimeout(Duration)`
so the conversion to and from int is no longer needed.

See gh-36270
2023-07-06 16:09:31 -07:00
Andy Wilkinson a460f7474f Merge branch '3.1.x'
Closes gh-36269
2023-07-06 19:45:14 +01:00
Andy Wilkinson b7099094b9 Merge branch '3.0.x' into 3.1.x
Closes gh-36268
2023-07-06 19:42:47 +01:00
Andy Wilkinson 4d70b83e80 Improve javadoc of ClientHttpRequestFactories
Closes gh-36267
2023-07-06 19:42:17 +01:00
Andy Wilkinson bb2c4cc742 Polish "Support JDK HttpClient in ClientHttpRequestFactories"
See gh-36118
2023-07-06 17:59:15 +01:00