Commit Graph

23607 Commits

Author SHA1 Message Date
Andy Wilkinson e6970243ee Retry read on ClosedByInterruptException
In gh-38154, we started handling ClosedByInterruptException. The
FileChannel was repaired by recreating it and then the exception was
rethrown. This allowed other threads to use the channel that had been
read by an interrupted thread while allowing that interruption to
continue.

This approach has proven to be insufficient as there are scenarios
where the read needs to succeed on the interrupted thread. This
commit updates the handling of ClosedByInterruptException so that
this is the case. The FileChannel is recreated as before but the
thread's interrupted flag is now cleared before retrying the read.
The flag is then reinstated so that any subsequent actions that
should fail due to the interruption will do so.

We could clear and reinstate the interrupted flag before the first
read, rather than catching ClosedByInterruptException. This approach
was rejected as it will have an impact on the performance of the
happy path where the thread hasn't been interrupted.

Fixes gh-38611
2023-12-07 10:49:40 -08:00
Phillip Webb 359a6cb5bb Use encoded version of path for jar URLs
Update `JarUrl` so that the encoded version of the path is used.
This allows jars to placed in directories with `#` or `!` in the
name.

Fixes gh-38660
2023-12-06 16:20:27 -08:00
Phillip Webb 847daf484c Fix JarUrlTests
Fix `JarUrlTests` to use the jarFile rather than temp.
2023-12-06 16:19:57 -08:00
Andy Wilkinson fc1a5033e8 Start building against Spring Security 6.2.1 snapshots
See gh-38700
2023-12-06 20:21:33 +00:00
Andy Wilkinson 91efe9396b Start building against Spring LDAP 3.2.1 snapshots
See gh-38699
2023-12-06 20:21:29 +00:00
Andy Wilkinson da4f2a4679 Start building against Spring Integration 6.2.1 snapshots
See gh-38698
2023-12-06 20:21:24 +00:00
Andy Wilkinson 174813c341 Start building against Spring Data Bom 2023.1.1 snapshots
See gh-38697
2023-12-06 20:21:19 +00:00
Andy Wilkinson 5e40739997 Start building against Spring Authorization Server 1.2.1 snapshots
See gh-38696
2023-12-06 20:21:14 +00:00
Andy Wilkinson 4fc2082972 Start building against Reactor Bom 2023.0.1 snapshots
See gh-38695
2023-12-06 20:21:09 +00:00
Andy Wilkinson 2a839788cc Start building against Micrometer Tracing 1.2.1 snapshots
See gh-38694
2023-12-06 20:21:04 +00:00
Andy Wilkinson 7fb0f52d7f Start building against Micrometer 1.12.1 snapshots
See gh-38693
2023-12-06 20:20:59 +00:00
Andy Wilkinson fb8043a31f Start building against Spring Session 3.1.4 snapshots
See gh-38683
2023-12-06 15:18:55 +00:00
Andy Wilkinson af469abb88 Start building against Spring Security 6.1.6 snapshots
See gh-38682
2023-12-06 15:18:50 +00:00
Andy Wilkinson 7f53a21328 Start building against Spring LDAP 3.1.3 snapshots
See gh-38681
2023-12-06 15:18:45 +00:00
Andy Wilkinson 4ff5be4619 Start building against Spring Data Bom 2023.0.7 snapshots
See gh-38679
2023-12-06 15:18:36 +00:00
Andy Wilkinson fb9b6833fc Start building against Spring Authorization Server 1.1.4 snapshots
See gh-38678
2023-12-06 15:18:31 +00:00
Andy Wilkinson 7de7aaa375 Start building against Reactor Bom 2022.0.14 snapshots
See gh-38677
2023-12-06 15:18:26 +00:00
Andy Wilkinson 7aed70b0bd Start building against Micrometer Tracing 1.1.8 snapshots
See gh-38676
2023-12-06 15:18:21 +00:00
Andy Wilkinson 57a7f210cd Start building against Micrometer 1.11.7 snapshots
See gh-38675
2023-12-06 15:18:16 +00:00
Andy Wilkinson 6dff3c5978 Adapt to change in Framework's disconnected client detection
See gh-38666
2023-12-06 14:18:40 +00:00
Moritz Halbritter ad5b844e1f Fix checkstyle issues
MissingParametersFailureAnalyzer looks like it has been commited by
accident.
2023-12-06 11:22:54 +01:00
Phillip Webb b5de38787c Restore `Session.Cookie` class for binary back-compatibility
Fixes gh-38589
2023-12-05 15:00:26 -08:00
Phillip Webb ffdd405fb1 Update NoUniqueBeanDefinitionFailureAnalyzer with parameter hints
Add addition description and action text to help point to the
fact that the `NoUniqueBeanDefinitionException` can be thrown
due to a missing `-parameters` compiler setting.

Closes gh-38652
2023-12-05 15:00:26 -08:00
Phillip Webb ce7d384d2c Add MissingParametersFailureAnalyzer
Add a new failure analyzer that provides hints whenever parameter
names cannot be discovered.

Closes gh-38603
2023-12-05 15:00:26 -08:00
Phillip Webb f609022731 Add suppressed missing parameters exception from ValueObjectBinder
Update `DataObjectBinder` interface and `ValueObjectBinder`
implementation so that suppressed exceptions are added whenever
parameter names cannot be discovered.

See gh-38603
2023-12-05 14:58:49 -08:00
Phillip Webb 6b58051aad Polish Binder code 2023-12-05 14:58:49 -08:00
Andy Wilkinson 49990afd78 Polish
See gh-38592
2023-12-05 20:49:34 +00:00
Andy Wilkinson 16c2ddb02c Merge branch '3.1.x'
Closes gh-38665
2023-12-05 20:31:17 +00:00
Andy Wilkinson b424254587 Test Gradle plugin against Gradle 8.5
Closes gh-38664
2023-12-05 20:30:54 +00:00
Moritz Halbritter de70b4fb4c Merge branch '3.1.x'
Closes gh-38661
2023-12-05 14:02:52 +01:00
Moritz Halbritter 3f29c7f84f Add log message if Docker Compose services are already running
Closes gh-38398
2023-12-05 14:02:16 +01:00
Andy Wilkinson 8e3f9cbc1a Upgrade to Hibernate 6.4.0.Final
Closes gh-38523
2023-12-05 12:13:43 +00:00
Moritz Halbritter f9a1eb000e Merge branch '3.1.x'
Closes gh-38658
2023-12-05 11:51:03 +01:00
Lars Uffmann 5981a3fd33 Build against UCP and JDBC driver for Oracle Database variant ucp11
See gh-38654
2023-12-05 11:40:35 +01:00
Moritz Halbritter 02347abefb Disable propagation of traces if tracing is disabled
Closes gh-38641
2023-12-05 11:19:43 +01:00
Moritz Halbritter a0fc2d48cd Merge branch '3.1.x' 2023-12-05 11:19:32 +01:00
Moritz Halbritter 350bc26bbe Reinstate 'management.tracing.enabled' property
See gh-38626
2023-12-05 11:18:18 +01:00
Arthur Gavlyukovskiy 829bec7602 Update documentation about jetty http2 dependency
See gh-38632
2023-12-04 13:34:29 +01:00
Moritz Halbritter 89a0ac3018 Reword documentation 2023-12-01 14:47:24 +01:00
Moritz Halbritter 4d01d95fbc Merge branch '3.1.x'
Closes gh-38627
2023-12-01 14:45:53 +01:00
Moritz Halbritter 3d4d1e80ca Remove management.tracing.enabled from documentation
Closes gh-38626
2023-12-01 14:43:13 +01:00
Brian Clozel 0321a8a05b Configure ObservationRegistry on JmsListener
Prior to this commit, we set in gh-37388 the ObservationRegistry on the
auto-configured JmsTemplate bean. This enables observations and context
propagation when sending JMS messages.

This commit applies the same to the `DefaultJmsListenerContainerFactory`
and the `DefaultJmsListenerContainerFactoryConfigurer`, in order to
enable observations on `@JmsListener` annotated methods.

This commit also refactors the support implemented in gh-37388 to avoid
relying on a bean post processor and instead set the observation
registry directly in the main auto-configuration: while Micrometer core
is an actuator-only dependency, Micrometer Observation API is a compile
dependnecy for spring-jms itself and there is no need to separate
concerns there.

Fixes gh-38613
2023-12-01 09:36:00 +01:00
Moritz Halbritter d172b22064 Escape pipe symbol in properties changelog table cells
Closes gh-38515
2023-11-30 11:37:25 +01:00
Moritz Halbritter fdbd65a2f5 Only apply awaitTerminationPeriod if awaitTermination is set
See gh-38528
2023-11-30 10:29:12 +01:00
Moritz Halbritter 6744cc2887 Apply awaitTerminationPeriod to SimpleAsyncTaskScheduler
Closes gh-38530
2023-11-30 10:25:33 +01:00
Moritz Halbritter e454470bf9 Apply awaitTerminationPeriod to SimpleAsyncTaskExecutor
Closes gh-38528
2023-11-30 09:25:49 +01:00
Moritz Halbritter 6cb9af11e8 Merge branch '3.1.x'
Closes gh-38610
2023-11-30 09:03:27 +01:00
Moritz Halbritter 203cd542c0 Clear MeterRegistry before each test case
Closes gh-38604
2023-11-30 09:02:22 +01:00
Andy Wilkinson 8de81cb06e Disable bind on init for all Tomcat connectors
If a connector is bound on init, it won't be unbound when stop()
is called. This leaves the connector running when it should have
been stopped. We currently disable bind on init for the main
connector but not for any additional connectors. This commit
disables bind on it for all connectors unless it is been
explicitly enabled through the bindOnInit property.

Closes gh-38564

Co-authored-by: Moritz Halbritter <moritz.halbritter@broadcom.com>
2023-11-29 14:28:09 +00:00
Moritz Halbritter 62a6d384f6 Merge branch '3.1.x'
Closes gh-38600
2023-11-29 14:00:01 +01:00
Tom Frenken 43bc104c4e Use system properties when constructing Apache HttpClient
See gh-38591
2023-11-29 13:49:20 +01:00
Phillip Webb 6fd691af58 Allow FileSystems to be create by splitting URLs
Relax the constraint that a `NestedLocation` must have a nested entry
name specified so that URLs can be split and rebuilt.

Prior to this commit, given a URL of the following form:

	jar:nested:/myjar.jar!/nested.jar!/my/file

It was possible to create a FileSystem from
"jar:nested:/myjar.jar!/nested.jar" and from that create a path to
"my/file".

However, it wasn't possible to create a FileSystem from
"jar:nested:/myjar.jar", then create another file system from the path
"nested.jar" and then finally create a path to "/nested.jar".

This was because `nested:/myjar.jar` was not considered a value URL
because it didn't include a nested entry name.

Projects such as `JobRunr` were relying on the ability to compose file
systems, so it makes sense to remove our somewhat artificial
restriction.

Fixes gh-38592
2023-11-28 22:14:29 -08:00
Phillip Webb 9a0f95420a Update NestedByteChannel.read to read all possible data when
Update `NestedByteChannel.read` so that it loops until all
remaining data has been read into the buffer. Prior to this
commit, it was possible for to read only some bytes into the
buffer. Although it looks like this should be OK according to
the API documentation, the `ZipFileSystem` relies on all
remaining bytes being returned.

Fixes gh-38595
2023-11-28 22:14:29 -08:00
Andy Wilkinson 75a8955659 Only start management context when parent has a web server
Fixes gh-38554
2023-11-28 17:45:12 +00:00
Andy Wilkinson 3e4e59a8f0 Restore compatibility with Liquibase 4.23
Closes gh-38522
2023-11-28 17:41:47 +00:00
Moritz Halbritter 903f85cd50 Merge branch '3.1.x'
Closes gh-38586
2023-11-28 13:17:42 +01:00
Alex Serbin 23816d6015 Fix Observation Filter docs
`WebMvcMetricsFilter` no longer exists since 3.0 and should be
replaced with `ServerHttpObservationFilter`

See gh-38570
2023-11-28 13:16:25 +01:00
Moritz Halbritter 34018b1982 Reinstate testAndDevelopmentOnly in Testcontainers documentation
Closes gh-38571
2023-11-28 11:13:59 +01:00
Phillip Webb 8c7e8778a6 Fix NegativeArraySizeException caused by missing unsigned conversion
Update `ZipContent` so that `eocd.totalNumberOfCentralDirectoryEntries`
is converted from a short to an unsigned int to prevent a negative
number from being used.

This commit also updates the code to consistently use `X.toUnsigned...`
helper methods rather than using bitwise operators.

Fixed gh-38572
2023-11-27 23:33:15 -08:00
Moritz Halbritter 86c2f28cb4 Prevent keep alive thread from blocking the AOT processing
Instead of creating the thread directly in the constructor, the thread
is now created when the context is refreshed and stopped when the
context is closed.

As AOT processing never refreshes the context, the thread is never
started and can't block the AOT processing task.

Closes gh-38531
2023-11-27 13:41:02 +01:00
Phillip Webb 0856e10443 Fix IndexOutOfBoundsException exception from parseUrl with empty spec
Update jar `Handler` code so that the `parseUrl` method can accept an
empty `spec`. Prior to this commit, a `classLoader.getResource("")`
call would result in a `null` result. This breaks a number of things
including `ClassPathResource` and `PathMatchingResourcePatternResolver`.

Fixes gh-38524
2023-11-23 14:35:04 -08:00
Johnny Lim f9f73aa146 Polish
See gh-38508
2023-11-23 09:39:01 +01:00
Moritz Halbritter f613ab89b9 Auto-configure observations for RestClients
Closes gh-38500
2023-11-23 09:28:09 +01:00
Andy Wilkinson 9c68a2ab87 Integrate child management context with parent context's lifecycle
Previously, the child management context was created when the
parent context's web server was initialized and it wasn't stopped
or closed until the parent context was closed. This resulted in
the child context being left running when the parent context was
stopped. This would then cause a failure when the parent context
was started again as another web server initialized event would be
received and a second child management context would be started.

This commit updates the initialization of the child management
context to integrate it with the lifecycle of the parent context.
The management context is now created the first time the parent
context is started. It is stopped when the parent context is
stopped and restarted if the parent context is started again.
This lifecycle management is done using a phase that ensures
that the child context is not started until the parent context's
web server has been started.

Fixes gh-38502
2023-11-22 19:50:22 +00:00
Andy Wilkinson 1707904f70 Upgrade to Spring Batch 5.0.4
Closes gh-38493
2023-11-22 19:49:53 +00:00
Phillip Webb 9f031b04e5 Merge branch '3.1.x'
Closes gh-38507
2023-11-22 11:13:12 -08:00
Phillip Webb bc504a8a03 Fix @ConditionalOnBean with annotation early FactoryBean initialization
Update `OnBeanCondition` with a variant of `getBeanNamesForAnnotation`
that does not cause early `FactoryBean` initialization.

Fixes gh-38473
2023-11-22 11:10:59 -08:00
Andy Wilkinson e7aeeb87cf Upgrade to Spring Integration 6.1.5
Closes gh-38303
2023-11-22 18:23:57 +00:00
Andy Wilkinson fc00c4006a Upgrade to Spring Integration 6.2.0
Closes gh-38315
2023-11-22 18:19:47 +00:00
Andy Wilkinson 4d33676c04 Upgrade to Spring Batch 5.1.0
Closes gh-38310
2023-11-22 18:19:46 +00:00
Andy Wilkinson a40f3da028 Merge branch '3.1.x'
Closes gh-38499
2023-11-22 12:35:58 +00:00
Andy Wilkinson ae5bae393b Remove unnecessary toLowerCase call from remainderIsDashes
Closes gh-38498
2023-11-22 12:35:36 +00:00
Andy Wilkinson a7571cf667 Use different default database names for Oracle XE and Oracle Free
Closes gh-38476
2023-11-22 10:48:35 +00:00
Moritz Halbritter 2323c7a838 Merge branch '3.1.x'
Closes gh-38496
2023-11-22 11:15:33 +01:00
Moritz Halbritter 74239ad689 Merge branch '3.0.x' into 3.1.x
Closes gh-38495
2023-11-22 11:15:20 +01:00
Moritz Halbritter 48e06af7ec Merge branch '2.7.x' into 3.0.x
Closes gh-38494
2023-11-22 11:15:07 +01:00
Moritz Halbritter 0171ed205c Polish "Document comments in SQL for database initialization"
See gh-38385
2023-11-22 11:14:13 +01:00
penekhun 578d0436e0 Document comments in SQL for database initialization
See gh-38385
2023-11-22 11:10:14 +01:00
Andy Wilkinson 2d7c8a144c Start building against Spring Batch 5.0.4 snapshots
See gh-38493
2023-11-22 09:39:31 +00:00
Andy Wilkinson 7d6a64bb56 Start building against Spring Batch 5.0.4 snapshots
See gh-38492
2023-11-22 09:38:09 +00:00
Moritz Halbritter b1da6f941f Merge branch '3.1.x' 2023-11-22 10:29:28 +01:00
Moritz Halbritter eddb17473b Fix deprecation clause on MongoPropertiesClientSettingsBuilderCustomizer 2023-11-22 10:29:12 +01:00
Johnny Lim 175b6473c7 Polish
See gh-38389
2023-11-22 10:16:19 +01:00
Georg Pirklbauer 969e142c34 Update Dynatrace docs with info about the meter metadata toggle
See gh-38368
2023-11-22 10:14:25 +01:00
Andy Wilkinson b473ffdea2 Upgrade to Spring Integration 5.5.20
Closes gh-38491
2023-11-22 08:28:52 +00:00
Scott Frederick d433deb737 Merge branch '3.0.x' into 3.1.x
Closes gh-38485
2023-11-21 17:30:54 -06:00
Scott Frederick dabcebf8a3 Merge branch '2.7.x' into 3.0.x
Closes gh-38484
2023-11-21 17:30:07 -06:00
Scott Frederick d1cce0f8ef Upgrade default CNB builders to Paketo Jammy
Closes gh-38477
2023-11-21 17:22:32 -06:00
Phillip Webb f37d6c9294 Upgrade to WebJars Locator Core 0.55
Closes gh-38481
2023-11-21 12:20:06 -08:00
Phillip Webb 3195560385 Upgrade to Rabbit Stream Client 0.14.0
Closes gh-38480
2023-11-21 12:20:06 -08:00
Phillip Webb 30208588a0 Upgrade to Mockito 5.7.0
Closes gh-38479
2023-11-21 12:20:06 -08:00
Phillip Webb ece763c44f Upgrade to GraphQL Java 21.3
Closes gh-38478
2023-11-21 12:20:06 -08:00
Phillip Webb 6c3dec42e0 Add container support for Oracle Free which replaces Oracle XE
Update Docker Compose and Testcontainers support to work with
`gvenzl/oracle-free` which replaces `gvenzl/oracle-xe`.

Closes gh-38476
2023-11-21 11:51:59 -08:00
Andy Wilkinson 0897d752bc Upgrade to Testcontainers 1.19.3
Closes gh-38471
2023-11-21 16:51:50 +00:00
Andy Wilkinson 84f0614bdf Upgrade to Spring Session 3.2.0
Closes gh-38319
2023-11-21 16:51:44 +00:00
Andy Wilkinson d4a1d10fa1 Upgrade to Spring GraphQL 1.2.4
Closes gh-38313
2023-11-21 16:51:43 +00:00
Andy Wilkinson 4659d14170 Upgrade to Spring Authorization Server 1.2.0
Closes gh-38309
2023-11-21 16:51:42 +00:00
Andy Wilkinson 09a15cbf1b Upgrade to Spring WS 4.0.8
Closes gh-38304
2023-11-21 15:34:37 +00:00
Andy Wilkinson 71a65019d6 Upgrade to Spring RESTDocs 3.0.1
Closes gh-38468
2023-11-21 15:34:37 +00:00
Andy Wilkinson ac873ea796 Upgrade to Spring Kafka 3.0.13
Closes gh-38370
2023-11-21 15:34:32 +00:00