Commit Graph

4647 Commits

Author SHA1 Message Date
Andy Wilkinson
06f5ab162f Exclude unwanted javax.inject dependency from Data Couchbase
See gh-40200
2024-04-09 09:07:13 +01:00
Phillip Webb
ea52a44e62 Polish 2024-04-04 20:55:52 -07:00
Phillip Webb
f1018ba38a Merge branch '3.1.x' into 3.2.x 2024-04-04 20:36:29 -07:00
Phillip Webb
21f5d375b7 Polish 2024-04-04 20:14:01 -07:00
Moritz Halbritter
fe7501b292 Use named virtual threads for Jetty
Closes gh-40152
2024-04-04 11:44:14 +02:00
Brian Clozel
c27bb77742 Merge branch '3.1.x' into 3.2.x 2024-03-19 11:38:03 +01:00
Brian Clozel
7eb155d76d Upgrade to GraphQL Java 20.8
Closes gh-40020
2024-03-19 11:36:57 +01:00
Moritz Halbritter
09652cb282 Polish "Set virtual thread names for RabbitMQ and Pulsar"
See gh-39958
2024-03-18 11:24:17 +01:00
Maziz
ecda754116 Set virtual thread names for RabbitMQ and Pulsar
See gh-39958
2024-03-18 11:24:10 +01:00
Chris Bono
ac0d1e0ec6 Re-enable Spring Pulsar interceptor tests
The PulsarTemplate recently replaced its list of ProducerInterceptors
with a list of ProducerBuilderCustomizers that customize the builder by
adding each interceptor to the builder. The PulsarAutoConfigurationTests
previosuly relied on the previous field. This commit adjusts the tests
to instead use the Customizers testing utility to verify the
interceptors.

(cherry picked from commit 9c054a021f)

See gh-39946
2024-03-15 11:00:09 +01:00
Scott Frederick
460d8a070d Merge branch '3.1.x' into 3.2.x
Closes gh-39773
2024-02-27 14:13:12 -06:00
Stéphane Nicoll
f6e4bede09 Stop throwing BindingException in tests
This commit adapts the error controller tests that need the request
to fail with a bind issue, and simulate the behavior of
ModelAttributeMethodProcessor.

As of Spring Framework 6.0.x, this processor no longer throws a
BindingException, but rather a MethodArgumentNotValidException and
the handing of BindException itself is deprecated.

This makes sure that those tests can smoothly be executed against
Spring Framework 6.2.x as throwing a BindingException now results
into an unresolved exception, and an internal server error rather than
the expected bad request.

See gh-39767
2024-02-27 14:12:19 -06:00
Scott Frederick
7efef3141e Merge branch '3.1.x' into 3.2.x
Closes gh-39769
2024-02-27 13:00:50 -06:00
Stéphane Nicoll
c259a673d3 Make resolution algorithm of ConnectionDetailsFactory more explicit
This commit moves the resolution check for ConnectionDetailsFactory
to a dedicated method to make it more clear that it is meant to verify
that the implementation is resolved and can be loaded from the
classpath.

The previous algorithm relied on a behavior of ResolvableType that only
resolves the first level generics. Further improvements in Spring
Framework 6.2 make this check invalid as some implementations use a
Container that can hold a nested generic.

See gh-39737
2024-02-27 12:46:51 -06:00
Phillip Webb
12de6aa46a Merge branch '3.1.x' into 3.2.x 2024-02-21 15:27:27 -08:00
Patrick Strawderman
057432c87b Re-order route registration for GraphQL web endpoints
Re-order the route registrations for GraphQL requests so that the
most commonly matched path is evaluated first.

Closes gh-39613
2024-02-19 14:36:09 +01:00
Moritz Halbritter
bb7706fe88 Merge branch '3.1.x' into 3.2.x
Closes gh-39619
2024-02-19 11:09:36 +01:00
Stéphane Nicoll
7d73b11239 Fix json path assertion
See gh-39605
2024-02-19 11:01:12 +01:00
Moritz Halbritter
d6d70828f1 Merge branch '3.1.x' into 3.2.x
Closes gh-39598
2024-02-16 09:44:32 +01:00
junhyung
8fee77761d Change ConcurrentReferenceCachingMetadataReaderFactory to use application's resource loader
See gh-39321
2024-02-16 09:32:24 +01:00
Andy Wilkinson
256f9fe83a Only configure WebFlux blocking executor when using virtual threads
Fixes gh-39469
2024-02-14 08:19:58 +00:00
Andy Wilkinson
b6467ed826 Adapt to Spring Data Neo4j now requiring a transaction manager
See gh-39493
2024-02-13 16:53:18 +00:00
Andy Wilkinson
d597a4d56b Correct handling of disable-html-escaping
See gh-39504
2024-02-12 12:35:47 +00:00
Andy Wilkinson
5746886e64 Merge branch '3.1.x' into 3.2.x
Closes gh-39524
2024-02-12 10:22:37 +00:00
Andy Wilkinson
4319554f8a Fix mapping of boolean properties to Gson's builder
Fixes gh-39504
2024-02-12 10:13:04 +00:00
Moritz Halbritter
4387b79831 Merge branch '3.1.x' into 3.2.x 2024-02-12 10:18:46 +01:00
Moritz Halbritter
8ffcfc9b77 Harmonize style of igored exceptions across the codebase 2024-02-12 10:14:20 +01:00
Andy Wilkinson
dada1378bd Start building against Spring GraphQL 1.2.5 snapshots
See gh-39482
2024-02-09 11:04:12 +00:00
Andy Wilkinson
af3ffb209c Start building against Spring GraphQL 1.2.5 snapshots
See gh-39462

Co-authored-by: Brian Clozel <brian.clozel@broadcom.com>
2024-02-08 15:19:32 +00:00
Chris Bono
41ed4d6cf4 Remove use of Pulsar ObjectMapperFactory
This commit removes the use of the Pulsar ObjectMapperFactory when
converting the authentication config props map to a JSON string. The
Pulsar factory operates on a shaded returned value of Jackson
ObjectMapper which may not exist when users are using the
non-shaded version of the Pulsar client lib.

See https://github.com/spring-projects/spring-pulsar/issues/562

See gh-39389
2024-02-06 13:12:57 +01:00
Moritz Halbritter
cee249197f Polish "Use generic wildcard for Pulsar beans"
See gh-39308
2024-01-31 09:54:18 +01:00
JonasG
c02dd14c66 Use generic wildcard for Pulsar beans
See gh-39308
2024-01-31 09:51:31 +01:00
Phillip Webb
cff8cb98c7 Merge branch '3.1.x' into 3.2.x 2024-01-22 12:20:24 -08:00
Phillip Webb
e1986ea11e Update copyright year of changed files 2024-01-22 12:20:06 -08:00
Andy Wilkinson
961da4e428 Make user details only back off without custom username or password
Closes gh-38864
2024-01-18 14:14:39 +00:00
Andy Wilkinson
fee359ff5e Downgrade to production-ready version of Oracle Database
This reverts commit d2325d1110.

Closes gh-38943
2024-01-17 20:14:09 +00:00
Andy Wilkinson
aec4550b02 Merge branch '3.1.x' into 3.2.x
Closes gh-39167
2024-01-17 13:00:22 +00:00
Andy Wilkinson
a7d52226d5 Polish "Improve toString of SslBundle implementations"
See gh-39137
2024-01-17 11:50:34 +00:00
amparab
b49ccbb0c2 Improve toString of SslBundle implementations
See gh-39137
2024-01-17 11:37:18 +00:00
Andy Wilkinson
a5d3fb588b Merge branch '3.1.x' into 3.2.x
Closes gh-39103
2024-01-11 13:55:34 +00:00
Andy Wilkinson
31936f036b Remove FlywayMigrationScriptMissingFailureAnalyzer from spring.factories
Closes gh-39102
2024-01-11 13:55:05 +00:00
Andy Wilkinson
7087897507 Merge branch '3.1.x' into 3.2.x
Closes gh-39091
2024-01-11 10:33:57 +00:00
Andy Wilkinson
45c32854a5 Fix Checkstyle upgrade
Closes gh-38746
2024-01-10 15:37:38 +00:00
Moritz Halbritter
793801b9cb Merge branch '3.1.x' into 3.2.x
Closes gh-39078
2024-01-10 09:53:45 +01:00
BenchmarkingBuffalo
56f00c4c21 Move autoStartup property
Move the property 'autoStartup' from BaseContainer to AmqpContainer.

See gh-39072
2024-01-10 09:52:28 +01:00
skcskitano
dc8b55c0ef Fix connection leak in SqlDialectLookup
See gh-38924
2024-01-10 09:46:39 +01:00
Phillip Webb
7216d2b031 Merge branch '3.1.x'
Closes gh-38916
2023-12-22 10:43:46 -08:00
Phillip Webb
95a8fa561c Correctly order @AutoConfigureAfter values when sorting
Update `AutoConfigurationSorter` so that `getClassesRequestedAfter()`
results are sorted to match the earlier name/order sorting. Prior to
this commit the order of items added via `@AutoConfigureAfter` was in
an undetermined order which could cause very subtle `@ConditionalOnBean`
bugs.

Thanks very much to Alexandre Baron for their help in diagnosing and
reproducing this issue.

Fixes gh-38904
2023-12-22 08:20:25 -08:00
Phillip Webb
15dd37095f Merge branch '3.1.x'
Closes gh-38880
2023-12-19 23:45:42 -08:00
Phillip Webb
b00d5fabe8 Auto-configure Hibernate JPA before DataSource TransactionManager
Fixes gh-38861
2023-12-19 23:44:48 -08:00
Phillip Webb
5354ad15b3 Merge branch '3.1.x'
Closes gh-38877
2023-12-19 22:51:48 -08:00
Yanming Zhou
ac18e3015c Use .isEmpty() where feasible
See gh-38739
2023-12-19 22:38:05 -08:00
Phillip Webb
2158f4cc43 Polish 'Use authParamString to configure Pulsar authentication'
See gh-38839
2023-12-16 22:23:37 -08:00
Chris Bono
4c0a19e8c0 Use authParamString to configure Pulsar authentication
Update `PulsarPropertiesMapper` to use JSON encoded parameters rather
than a `Map` since the `Map` method is deprecated in Pulsar. This
commit simply takes the auth params map and converts them to the
expected encoded JSON string of auth parameters.

See gh-38839
2023-12-16 22:19:45 -08:00
Phillip Webb
26dc14031e Update LoadedPemSslStore to use lazy loading
Update `LoadedPemSslStore` so that it loads content lazily. This
restores the behavior of Spring Boot 3.1 and allows bundles to be
defined with files that don't exist as long as they are never accessed.

Fixes gh-38659
2023-12-14 22:03:07 -08:00
Phillip Webb
1d10e51755 Adapt to upstream Spring Security changes 2023-12-14 20:33:09 -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
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
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
cc665dd529 Merge branch '3.1.x'
Closes gh-38727
2023-12-11 09:18:25 +01:00
Donghun Shin
f922b3de03 Rename local variable in BatchAutoConfiguration
See gh-38674
2023-12-11 08:25:39 +01: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
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
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
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
Andy Wilkinson
3e4e59a8f0 Restore compatibility with Liquibase 4.23
Closes gh-38522
2023-11-28 17:41:47 +00:00
Johnny Lim
f9f73aa146 Polish
See gh-38508
2023-11-23 09:39:01 +01: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
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
Lars Uffmann
adb841c45e Update JobLauncherApplicationRunner to use getIdentifyingParameters
See gh-38327
2023-11-13 12:12:34 +01:00
Moritz Halbritter
c66322491d Merge branch '3.1.x'
Closes gh-38339
2023-11-13 11:50:57 +01:00
Moritz Halbritter
24cb05cb59 Merge branch '3.0.x' into 3.1.x
Closes gh-38338
2023-11-13 11:49:51 +01:00
Lars Uffmann
e41b36273f Remove unnecessary JobOperator bean definition
See gh-38325
2023-11-13 11:46:38 +01:00
Brian Clozel
67c5d10051 Process multipart properties for PartEvent support
Prior to this commit, some properties in the `spring.webflux.multipart`
namespace were ignored for the streaming use case because those were not
supported in streaming mode with `PartEvent`.

As of Spring Framework 6.1, the `max-parts` and
`max-disk-usage-per-part` properties can be supported and this commit
maps those properties accordingly.

Fixes gh-37642
2023-11-10 11:36:13 +01:00
Andy Wilkinson
9247104830 Merge branch '3.1.x'
Closes gh-38286
2023-11-09 20:31:53 +00:00
Andy Wilkinson
b6a9c67719 Avoid adding Jetty's upgrade filter to non-Jetty servers
Fixes gh-38181
2023-11-09 20:30:35 +00:00
Claudio Nave
4a6564c0a9 Add Liquibase show-summary and show-summary-output properties
Update `LiquibaseProperties` and `LiquibaseAutoConfiguration` to
support the recently added `setShowSummary` and
`setShowSummaryOutput` methods.

See gh-38274
2023-11-09 11:48:36 -08:00
Claudio Nave
61aecdedd6 Remove Liquibase javax.activation excludes
Liquibse no longer declares a dependency on `javax.activation`
(see https://github.com/liquibase/liquibase/issues/4487) so we
can now remove our exclusions.

See gh-38274
2023-11-09 11:44:31 -08:00
Andy Wilkinson
82c9ab4cbd Merge branch '3.1.x'
Closes gh-38268
2023-11-08 17:10:19 +00:00
Andy Wilkinson
1e1effe131 Merge branch '3.0.x' into 3.1.x
Closes gh-38267
2023-11-08 16:59:15 +00:00
Andy Wilkinson
6d46c24db7 Merge branch '2.7.x' into 3.0.x
Closes gh-38266
2023-11-08 15:58:40 +00:00
Andy Wilkinson
7c73a034b6 Improve backwards- and forwards-compatibility of Flyway auto-config
Closes gh-38164
2023-11-08 15:17:49 +00:00
Moritz Halbritter
d59b385304 Merge branch '3.1.x'
Closes gh-38226
2023-11-06 10:27:50 +01:00
Moritz Halbritter
3560a13d57 Merge branch '3.0.x' into 3.1.x
Closes gh-38225
2023-11-06 10:27:42 +01:00
Yanming Zhou
d7ab153559 Use switch expression where feasible
See gh-38217
2023-11-06 10:27:04 +01:00
Moritz Halbritter
a944815e3c Merge branch '3.1.x'
Closes gh-38221
2023-11-06 08:58:16 +01:00
Eddú Meléndez
674f8fbb8d Polish RabbitAutoConfiguration
See gh-38216
2023-11-06 08:57:19 +01:00
Scott Frederick
55ab56f8d9 Polish "Add observationEnabled properties for Apache Kafka"
See gh-38057
2023-11-02 17:05:17 -05:00
Zhiyang.Wang1
ff9d9de1ee Add observationEnabled properties for Apache Kafka
See gh-38057
2023-11-02 17:05:17 -05:00
Scott Frederick
99986a2fdd Polish SSL internals 2023-11-02 14:41:06 -05:00
Moritz Halbritter
d3f177be71 Polish SSL 2023-11-02 09:36:06 +01:00
Phillip Webb
9b71ef4114 Polish and refactor some SSL internals
Polish and refactor some of the internal SSL code to make it easier to
add additional functionality in the future.
2023-11-01 16:14:59 -07:00