Commit Graph

46620 Commits

Author SHA1 Message Date
Sandra Ahlgrimm
b0bc872831 Add the LangChain4J to the list of community starters
See gh-38776
2023-12-19 23:14:01 -08:00
Andy Wilkinson
60ebb32e8a Upgrade to Reactor Bom 2023.0.1
Closes gh-38695
2023-12-14 09:41:57 +00:00
Andy Wilkinson
96f1a46fef Upgrade to Micrometer Tracing 1.2.1
Closes gh-38694
2023-12-14 09:41:55 +00:00
Andy Wilkinson
0dedccc1a1 Upgrade to Micrometer 1.12.1
Closes gh-38693
2023-12-14 09:41:52 +00:00
Andy Wilkinson
e5023ea177 Merge branch '3.1.x' 2023-12-14 09:38:33 +00:00
Andy Wilkinson
8d5175b68d Upgrade to Reactor Bom 2022.0.14
Closes gh-38677
2023-12-14 09:25:50 +00:00
Andy Wilkinson
c3e3245bb3 Upgrade to Micrometer Tracing 1.1.8
Closes gh-38676
2023-12-14 09:25:49 +00:00
Andy Wilkinson
5f51083005 Upgrade to Micrometer 1.11.7
Closes gh-38675
2023-12-14 09:25:48 +00:00
Phillip Webb
a9efa96d8a Merge branch '3.1.x'
Closes gh-38770
2023-12-13 16:53:20 -08:00
Phillip Webb
da31137596 Ensure that StaticResourceJars does not close cached jars
Update `StaticResourceJars` so that jars obtained via a
`JarURLConnection` are only closed when caches are not being used.

Fixes gh-38766
2023-12-13 16:51:02 -08:00
Phillip Webb
b4a4e91238 Update ZipString to deal with reads that do not return all data
Refine the logic in `ZipString.hash` and `ZipString.compare` to deal
with the fact a read operation may not return all available bytes.

Fixes gh-38751
2023-12-13 13:29:37 -08:00
Andy Wilkinson
afad358047 Align reactive web security more closely with servlet web security
There are some notable differences in the behavior of Spring
Security's reactive and servlet-based web security. Notably,
Servlet-based web security (`@EnableWebSecurity`) works without
any authentication manager, rejecting requests as not authorized.
By contrast reactive-based web security (`@EnableWebFluxSecurity`)
fails to start up when there's no authentication manager, either
provided directly as a bean or derived from a
ReactiveUserDetailsService. There are also further differences at
runtime where empty Monos from all ReactiveAuthenticationManagers
results in an internal error and a 500 response whereas a similar
situation in the servlet implementation results in a 401.

Previously, to accommodate these differences in behavior, Spring
Boot's auto-configuration would behave differently. In the Servlet
case, web security would be enabled whenever the necessary
dependencies were on the classpath. In the reactive case, web
security would back off in the absence of an authentication manager
to prevent a start up failure. While this difference is rooted in
Spring Security, it is undesirable and something that we want to
avoid Spring Boot users being exposed to where possible.
Unfortunately, the situation is more likely to occur than before
as ReactiveUserDetailsServiceAutoConfiguration now backs off more
readily (gh-35338). This makes it more likely that the context will
contain neither a reactive authetication manager not a reactive
user details service.

This commit reworks the auto-configurations related to reactive
security. ReactiveSecurityAutoConfiguration will now auto-configure
an "empty" reactive authentication manager that denies access through
Mono.error in the absence of a ReactiveAuthenticationManager,
ReactiveUserDetailsService, or SecurityWebFilterChain. The last of
these is to allow for the situation where a filter chain has been
defined with an authentication manager configured directly on it.
This configuration of an authentication manager allows
`@EnableWebFluxSecurity` to be auto-configured more readily,
removing one of the differences between reactive- and Servlet-based
security.

Corresponding updates to the auto-configurations for reactive OAuth2
support have also been made. They no longer try to auto-configure
`@EnableWebFluxSecurity`, relying instead upon
ReactiveSecurityAutoConfiguration, which they are ordered before, to
do that instead.

Closes gh-38713
2023-12-13 12:44:04 +00:00
Andy Wilkinson
964ccbb000 Revert "Do not enable WebFlux security unless other configuration is active"
This reverts commit beba1f176a.

See gh-38713
2023-12-13 11:17:08 +00:00
Moritz Halbritter
3ac9c44942 Merge branch '3.1.x' 2023-12-13 11:19:44 +01:00
Moritz Halbritter
82bc9a6280 Polish 2023-12-13 11:19:40 +01:00
Moritz Halbritter
2197e36d91 Merge branch '3.1.x'
Closes gh-38764
2023-12-13 11:18:19 +01:00
Moritz Halbritter
d1badfe63a Document minimum supported Docker Compose version
Closes gh-38760
2023-12-13 11:18:09 +01:00
Moritz Halbritter
c50172d5c7 Undeprecate 'management.metrics.tags'
Closes gh-38583
2023-12-13 08:26:11 +01:00
Scott Frederick
35eba69996 Merge branch '3.1.x'
Closes gh-38759
2023-12-12 15:43:10 -06:00
Scott Frederick
823054f543 Allow native spring-boot-image-tests to run without an existing snapshot
Closes gh-38757
2023-12-12 15:42:37 -06:00
Moritz Halbritter
e81d1226fe Prevent integer overflow when checking disk space 2023-12-12 16:26:58 +01:00
Moritz Halbritter
01f59608ac Merge branch '3.1.x'
Closes gh-38752
2023-12-12 16:23:33 +01:00
Moritz Halbritter
b8021dbc65 Exclude Rabbit Stream when testing RabbitAutoConfiguration
The stream auto-configuration is tested in RabbitStreamConfigurationTests,
and excluding it prevents the creation of the "rabbitStreamEnvironment"
Environment bean, which delays the application context close by 1 second
because it has to wait for some Netty resources to gracefully shut down.

Closes gh-38750
2023-12-12 16:12:22 +01:00
Andy Wilkinson
612bf95b05 Adapt to changes in the locking model for closing an app context
See gh-38666
2023-12-12 14:51:06 +00:00
Moritz Halbritter
a242bd81e2 Merge branch '3.1.x'
Closes gh-38747
2023-12-12 13:55:44 +01:00
Moritz Halbritter
af8e6a422a Merge pull request #38702 from quaff
* pr/38702:
  Use idiomatic AssertJ assertions

Closes gh-38702
2023-12-12 13:55:34 +01:00
Yanming Zhou
3c65fdfa12 Use idiomatic AssertJ assertions
See gh-38702
2023-12-12 13:53:20 +01:00
Moritz Halbritter
198dbb4a45 Auto-configure observatibility beans in sliced tests
If @AutoConfigureObservability is applied to a sliced test, it
auto-configures:

- An in-memory MeterRegistry
- A no-op Tracer
- An ObservationRegistry

Closes gh-38568
2023-12-12 11:29:43 +01:00
Moritz Halbritter
ff82b8d1c1 Add auto-configuration for a no-op tracer
This auto-configuration ensures, if Micrometer Tracing is on the
classpath, that there is always a tracer. It backs off if there is
already a tracer, for example contributed by the Brave or the Otel
auto-configurations, which are run before.

See gh-38568
2023-12-12 11:29:43 +01:00
Phillip Webb
ea87787279 Merge branch '3.1.x'
Closes gh-38741
2023-12-11 20:37:45 -08:00
Phillip Webb
39bc7c8582 Support getPermissions() call on Gradle 8.6-milestone-1
The `getPermissions` method is now part of the private
`ParentDirectoryStub` class so we now need to call
`setAccessible(true)`.

Fixes gh-38718
2023-12-11 20:35:06 -08:00
Phillip Webb
0fe7d78732 Restore support for custom bind converters in collections
Update the `beansConverterService` introduced in commit f4e05c91c7
so that it can also handle collection based conversions.

Fixes gh-38734
2023-12-11 17:05:27 -08:00
Andy Wilkinson
beba1f176a Do not enable WebFlux security unless other configuration is active
Following the changes in gh-37504, the reactive resource server
auto-configuration could enable WebFlux security in situations where
it was otherwise in active. This could then result in an application
failing to start as no authentication manager is available.

This commit updates the configurations that enable WebFlux security
so that they fully back off unless their related configurations are
active. Previously, only the configuration of the
SecurityWebFilterChain would back off. This has been expanded to
cover `@EnableWebFluxSecurity` as well. This has required splitting
the configuration classes up so that the condition evaluation order
can be controlled more precisely. We need to ensure that the JWT
decoder bean or the opaque token introspector bean has been defined
before evaluation of the conditions for `@EnableWebFluxSecurity`.
Without this control, the import through `@EnableWebFluxSecurity` in
one location where the conditions do not matchcan prevent a
successful import in another where they do.

Fixes gh-38713
2023-12-11 12:46:29 +00:00
Moritz Halbritter
6330190913 Merge branch '3.1.x'
Closes gh-38728
2023-12-11 09:44:19 +01:00
Moritz Halbritter
52baf0003b Merge pull request #38708 from quaff
* pr/38708:
  Cleanup kotlin sources

Closes gh-38708
2023-12-11 09:40:10 +01:00
Yanming Zhou
ebfbc0ef05 Cleanup kotlin sources
1. remove unused imports
2. remove redundant semicolon
3. remove empty class body
4. remove redundant 'constructor' keyword
5. remove redundant 'Unit' return type
6. use non-null type if possible

See gh-38708
2023-12-11 09:23:42 +01:00
Moritz Halbritter
cc665dd529 Merge branch '3.1.x'
Closes gh-38727
2023-12-11 09:18:25 +01:00
Moritz Halbritter
4ad9f1174f Merge pull request #38674 from shin-mallang
* pr/38674:
  Rename local variable in BatchAutoConfiguration

Closes gh-38674
2023-12-11 08:25:58 +01:00
Donghun Shin
f922b3de03 Rename local variable in BatchAutoConfiguration
See gh-38674
2023-12-11 08:25:39 +01:00
Moritz Halbritter
ad586078a7 Merge branch '3.1.x'
Closes gh-38725
2023-12-11 08:18:43 +01:00
Moritz Halbritter
1b3eef7d62 Merge pull request #38706 from pirgeo
* pr/38706:
  Update Dynatrace documentation links

Closes gh-38706
2023-12-11 08:17:58 +01:00
Georg Pirklbauer
a8d706f485 Update Dynatrace documentation links
See gh-38706
2023-12-11 08:13:56 +01:00
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
Andy Wilkinson
9eae176fce Merge branch '3.1.x'
Closes gh-38692
2023-12-07 12:12:07 +00:00
Andy Wilkinson
2d6d2352e6 Upgrade CI images to ubuntu:jammy-20231128
Closes gh-38691
2023-12-07 12:11:30 +00: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