Commit Graph

4806 Commits

Author SHA1 Message Date
Moritz Halbritter 2cce123bb5 Add property to control 'path' field inclusion in error responses
By default it is included.

Closes gh-38619
2024-01-09 09:33:00 +01:00
Moritz Halbritter a7d88b69d4 Add RabbitMQ properties to enable observations
Observations can be enabled for the simple, direct and stream listener
and on the RabbitTemplate.

Closes gh-36451
2024-01-08 15:58:13 +01:00
Andy Wilkinson 4b89723861 Remove APIs that were deprecated for removal in 3.3.0
Closes gh-39039
2024-01-05 11:20:35 +00:00
Andy Wilkinson 6bd042e83b Upgrade to Commons DBCP2 2.11.0
Closes gh-39002
2024-01-04 17:26:37 +00:00
Andy Wilkinson a1c7c0bccc Upgrade to AssertJ 3.25.1
Closes gh-38997
2024-01-04 17:26:35 +00: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
Phillip Webb 30a7426e86 Apply key property to the keystore and not to the truststore
Update `PropertiesSslBundle` so that key properties are now
only applied to the keystore and not the truststore.

Closes gh-38125
2023-11-01 16:10:51 -07:00
Phillip Webb 5dc5c2a4bc Rename `KeyVerifier` to `CertificateMatcher`
Rename `KeyVerifier` to `CertificateMatcher` and refactor some
of the internals. This commit also adds test helper classes to
help simplify some of the tests.

See gh-38173
2023-11-01 16:10:31 -07:00
Phillip Webb 1b61bc1f20 Move PEM verification to spring-boot-autoconfigure
Move `KeyVerifier` to spring-boot-autoconfigure to reduce the
public API required in `PemSslStoreBundle`.

This commit also moves the verify property so that is can be set
per store.

Closes gh-38173
2023-11-01 16:10:16 -07:00
Phillip Webb 2c6fca8df7 Allow alias and password to be configured on a per PEM store basis
Closes gh-38124
2023-11-01 16:02:33 -07:00
Andy Wilkinson 8f2ec22738 Merge branch '3.1.x'
Closes gh-38152
2023-10-31 11:50:42 +00:00
Andy Wilkinson 1fcf1fcc20 Merge branch '3.0.x' into 3.1.x
Closes gh-38151
2023-10-31 11:50:32 +00:00
Andy Wilkinson 8f4ea6834d Merge branch '2.7.x' into 3.0.x
Closes gh-38150
2023-10-31 11:50:18 +00:00
Andy Wilkinson 020c2b364e Fix handling of value that overflows an int
Closes gh-38146
2023-10-31 11:47:14 +00:00
Andy Wilkinson d2325d1110 Upgrade to Oracle Database 23.3.0.23.09
Closes gh-38121
2023-10-30 20:42:24 +00:00
Andy Wilkinson 5765f9410c Upgrade to Liquibase 4.24.0
Closes gh-38120
2023-10-30 20:41:49 +00:00
Andy Wilkinson 4f7e4712dd Merge branch '3.1.x'
Closes gh-38019
2023-10-25 10:45:07 +01:00
Andy Wilkinson 4faabcfcdd Merge branch '3.0.x' into 3.1.x
Closes gh-38018
2023-10-25 10:44:38 +01:00
Andy Wilkinson b33ee84146 Merge branch '2.7.x' into 3.0.x
Closes gh-38017
2023-10-25 10:44:03 +01:00
Andy Wilkinson 8778884f5d Clarify role of WebMvcRegistrations and WebMvcConfigurer
Closes gh-31232
2023-10-25 10:42:25 +01:00
Andy Wilkinson a9469d9c8e Adapt to changes in Framework's internals
See gh-37995
2023-10-23 18:07:38 +01:00
Johnny Lim b5d4983829 Polish
See gh-37984
2023-10-23 11:15:27 +02:00
Phillip Webb 3eeb1b2849 Merge branch '3.1.x' 2023-10-19 23:21:42 -07:00
Phillip Webb 9f3afb3636 Merge branch '3.0.x' into 3.1.x 2023-10-19 23:21:20 -07:00
Phillip Webb 7c864804d5 Merge branch '2.7.x' into 3.0.x 2023-10-19 23:21:08 -07:00
Phillip Webb d47f8bf945 Update copyright year of changed files 2023-10-19 23:20:43 -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
Phillip Webb 93b562e632 Fix PulsarProperties lookupTimeout
Prefer `null` to `-1` for the default timeout.

See gh-34763
2023-10-18 20:52:12 -07:00
Andy Wilkinson ec6415f04b Add SSL bundle support to Apache Kafka auto-configuration
Closes gh-37629
Co-authored-by: Scott Frederick <sfrederick@vmware.com>
2023-10-18 16:34:28 -05:00
Andy Wilkinson 851e6def76 Fix tests on Windows
See gh-37808
2023-10-18 14:08:41 +01:00
Andy Wilkinson 02c49b0287 When virtual threads are enabled, configure Pulsar to use them
Closes gh-36347
2023-10-17 15:59:41 +01:00
Andy Wilkinson d796087dfa Polish "Add properties for configuring EnumFeature and JsonNodeFeature"
See gh-37885
2023-10-16 15:39:25 +01:00
Eddú Meléndez 8edb4b9729 Add properties for configuring EnumFeature and JsonNodeFeature
Both `EnumFeature` and `JsonNodeFeature` implement `DataTypeFeature`
which was recently added in Spring Framework. This commits introduces
support to allow the configuration via properties.

See spring-projects/spring-framework#31380

See gh-37885
2023-10-16 15:00:32 +01:00
Andy Wilkinson 19fd88b25b Implement SSL hot reload for Netty and Tomcat
Closes gh-37808
2023-10-16 14:08:26 +01:00
Brian Clozel 339f75d309 Fix GraphQL WebSocket HandlerMapping bean ordering
Prior to this commit, the GraphQL WebSocket HandlerMapping bean would be
ordered at position "2", before the RouterFunction variant defined by
Spring Framework at position "3".

Since then, the Spring Framework team changed the default order value
for this one at "-1", see spring-projects/spring-framework#30278.
This prevents the WebSocket upgrade, as the request is handled by the
RouterFunction instead of the WebSocket handler.

This commit updates the handlermapping order and introduces a test to
prevent issues in the future.

Fixes gh-37892
2023-10-16 12:11:31 +02:00
Andy Wilkinson 932fe4fcf8 Polish "Avoid ObjectMappear creation in WebSocketMessagingAutoConfiguration"
See gh-37861
2023-10-13 10:41:07 +01:00
Johnny Lim 5397ad0822 Avoid ObjectMappear creation in WebSocketMessagingAutoConfiguration
See gh-37861
2023-10-13 10:39:51 +01:00
Andy Wilkinson db50de3c1d Upgrade to MongoDB 4.11.0
Closes gh-37874
2023-10-13 09:14:17 +01:00
Andy Wilkinson 6fbc328b4c Polish "Add support for configuring non-standard JMS acknowledge modes"
See gh-37576
2023-10-12 10:56:43 +01:00
Vedran Pavic d72fb8e127 Add support for configuring non-standard JMS acknowledge modes
Prior to this commit, `spring.jms.listener.session.acknowledge-mode`
and `spring.jms.template.session.acknowledge-mode` accepted only a
predefined set of values representing standard JMS acknowledge modes.

This commit adds support for also using arbitrary integer values to
these configuration properties, which allows vendor-specific JMS
acknowledge modes to be configured.

See gh-37576
2023-10-12 08:36:30 +01:00
Scott Frederick 5556739c8c Add SSL bundle support to Rabbit auto-configuration 2023-10-11 15:39:51 -05:00
Andy Wilkinson bdaf7a7603 Merge branch '3.1.x'
Closes gh-37830
2023-10-11 15:06:09 +01:00
Andy Wilkinson 411586347c Merge branch '3.0.x' into 3.1.x
Closes gh-37829
2023-10-11 15:04:21 +01:00
Andy Wilkinson 781ac2ece2 Merge branch '2.7.x' into 3.0.x
Closes gh-37828
2023-10-11 15:02:36 +01:00
Andy Wilkinson 5a75fae23b Polish "Polish"
See gh-37745
2023-10-11 14:58:04 +01:00
Johnny Lim 303015ea2d Polish
See gh-37745
2023-10-11 14:57:38 +01:00
Moritz Halbritter 6874a2fb9a Polish "Remove @ConditionalOnMissingBean from RestTemplateBuilderConfigurer"
See gh-37746
2023-10-11 14:03:12 +02:00
saravanakumar Ramasamy 882e29dc7f Remove @ConditionalOnMissingBean from RestTemplateBuilderConfigurer
See gh-37746
2023-10-11 13:39:44 +02:00
Phillip Webb 4ab104f5af Use type safe JdbcClient query
Update `JdbcClientAutoConfigurationTests` to use a type safe query
since Spring Framework now returns `Object` types when no type is
specified (see Spring Framework issue 31403).

See gh-37710
2023-10-10 16:29:37 -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 8a97ff31ae Merge branch '3.1.x'
Closes gh-37806
2023-10-10 11:28:00 +01:00
Andy Wilkinson 1087827b9a Merge branch '3.0.x' into 3.1.x
Closes gh-37805
2023-10-10 11:27:37 +01:00
Andy Wilkinson 5fcdee6bb5 Merge branch '2.7.x' into 3.0.x
Closes gh-37804
2023-10-10 11:26:39 +01:00
Andy Wilkinson 6df5389d76 Use RedisSeralizer.java(ClassLoader) factory method
Closes gh-37800
2023-10-10 11:25:22 +01:00
Andy Wilkinson 31008def76 Polish "Instrument user-created DataSource for checkpoint-restore"
See gh-37630
2023-10-10 10:27:10 +01:00
Olga MaciaszekSharma 4b5e50ba94 Instrument user-created DataSource for checkpoint-restore
See gh-37630
2023-10-10 10:26:15 +01:00
Andy Wilkinson 48059417b5 Upgrade to Kafka 3.6.0
Closes gh-37777
2023-10-09 13:46:52 +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
Moritz Halbritter fc9c1c0964 Fix ordering related issue in ReactorAutoConfigurationTests
See gh-34201
2023-10-04 11:00:02 +02:00
Moritz Halbritter 5b129ceb09 Switch reactor context propagation from auto to limited
- Polish
- Fix @since tags
- Add a test case
- Update context-propagation version

Closes gh-34201
2023-10-04 09:37:45 +02:00
Moritz Halbritter 30f29dead8 Revert "Temporarily remove auto-config for Reactor context propagation"
This reverts commit 88de3cc089.

See gh-34201
2023-10-04 09:12:27 +02:00
Phillip Webb 560527945b Add background preinitializers for Tomcat and JDK ZoneId
Closes gh-37670
2023-10-03 17:28:44 -07:00
Andy Wilkinson 12108e58e9 Merge branch '3.1.x'
Closes gh-37664
2023-10-03 16:47:11 +01:00
Andy Wilkinson 8cf686d925 Merge branch '3.0.x' into 3.1.x
Closes gh-37663
2023-10-03 16:27:19 +01:00
Andy Wilkinson 6353603d63 Avoid exposing Jetty's WebSocketUpgradeFilter as a bean
When the filter is exposed as a bean (directly or through a
registration bean), it's picked up by the auto-configuration of
MockMvc. This causes a problem as MockMvc does not call init on a
filter before it's used and WebSocketUpgradeFilter fails with a
NullPointerException if its doFilter method is called when its init
method has not been called.

This commit reworks the WebSocket auto-configuration to use a
ServletContextInitalizer to register WebSocketUpgradeFilter rather
than a FilterRegistrationBean. This ensure that the filter is still
registered at the required position in the chain (last filter before
the servlet) while also preventing it from being registered with the
auto-configured MockMvc in tests.

Closes gh-37660
2023-10-03 16:13:24 +01: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 4493958f13 Improve conditions for enabling WebFlux security
This commit correct a mistake where AuthenticationManager was used
instead of ReactiveAuthenticationManager. It also expands the
conditions so that WebFlux security will be enabled when the user
has defined their own SecurityWebFilterChain. In such a situation
no other security-related beans may be needed to use WebFlux
security as things may have been configured directly using the DSL.

Closes gh-37504
2023-09-30 09:06:00 +01:00
Andy Wilkinson 426e31695f Merge branch '3.1.x' 2023-09-29 15:14:32 +01:00
Andy Wilkinson 385e6278b7 Merge branch '3.0.x' into 3.1.x 2023-09-29 15:14:17 +01:00
Andy Wilkinson 26b9602596 Merge branch '2.7.x' into 3.0.x 2023-09-29 15:14:09 +01:00
Andy Wilkinson 0205b875a0 Polish 2023-09-29 15:13:58 +01:00
Andy Wilkinson 76eb5ba8c2 Merge branch '3.1.x'
Closes gh-37633
2023-09-29 15:02:19 +01:00
Andy Wilkinson c4bccb2429 Merge branch '3.0.x' into 3.1.x
Closes gh-37632
2023-09-29 14:59:06 +01:00
Andy Wilkinson 04054b6670 Merge branch '2.7.x' into 3.0.x
Closes gh-37631
2023-09-29 14:58:52 +01:00
Andy Wilkinson bfd1a29e53 Exclude AbstractTransactionAspect from lazy init
Fixes gh-37506
2023-09-29 14:16:27 +01:00
Andy Wilkinson 6d3594db49 Add execution listeners to auto-configured transaction managers
Closes gh-36770
2023-09-29 09:54:04 +01:00
Andy Wilkinson 1a22415c01 Expand customization to any type of TransactionManager
Closes gh-37628
2023-09-29 09:54:03 +01:00
Andy Wilkinson 96986a6b51 Break cycle between TransactionManagerCustomizers and TransactionManager
Closes gh-36801
2023-09-29 09:53:34 +01:00
Scott Frederick 228041666b Merge branch '3.1.x'
Closes gh-37622
2023-09-28 16:11:31 -05:00
Scott Frederick fad43adf14 Polish "Support IPv6 addresses when configuring RabbitMQ using properties"
See gh-37619
2023-09-28 16:07:25 -05:00
csk8167 c1972f6db6 Support IPv6 addresses when configuring RabbitMQ using properties
See gh-37619
2023-09-28 16:06:39 -05:00
shin-mallang 8eac7a91f6 Remove duplicate code in NettyWebServerFactoryCustomizer
Since the PropertyMapper's alwaysApplyingWhenNonNull() has already been
called, the subsequent whenNonNull() is unnecessary.

See gh-37434
2023-09-28 09:51:51 +02:00
Sreekara Reddy 8fad59466c Don't call setValidateConnectionOnBorrow on Oracle UCP datasource
See gh-37501
2023-09-28 09:10:59 +02:00
Phillip Webb 052757c2d8 Polish 2023-09-27 20:58:09 -07:00
Phillip Webb 3591f4d614 Restore test ensuring maxInboundMessageBodySize property matches default
See gh-37603
2023-09-27 18:21:24 -07:00
Andy Wilkinson 4e5f16f2bc Polish "Add config prop for Rabbit's max inbound message body size"
See gh-37603
2023-09-27 19:28:10 +01:00
Gary Russell 954f56287f Add config prop for Rabbit's max inbound message body size
See gh-37603
2023-09-27 19:28:10 +01:00
Andy Wilkinson f9b4a1ea5b Merge branch '3.1.x' 2023-09-27 19:27:58 +01:00
Andy Wilkinson 6fb252b00c Polish 2023-09-27 19:26:18 +01:00
Andy Wilkinson 4e38469ba2 Merge branch '3.1.x'
Closes gh-37611
2023-09-27 18:16:00 +01:00
Andy Wilkinson 4a3901149b Fix additional metadata location for spring.jmx.registration-policy
Closes gh-37596
2023-09-27 18:15:05 +01:00
Andy Wilkinson 192fb346bc Merge branch '3.1.x'
Closes gh-37610
2023-09-27 18:12:33 +01:00
Andy Wilkinson 1bcd127ad0 Merge branch '3.0.x' into 3.1.x
Closes gh-37609
2023-09-27 18:10:04 +01:00
Andy Wilkinson c486892a9b Fix additional metadata location for spring.webflux.multipart.streaming
Closes gh-37608
2023-09-27 18:09:14 +01:00
Andy Wilkinson 0d2eaa716c Polish "Add config prop for JMS listener's sessionTransacted flag"
See gh-37473
2023-09-27 15:07:36 +01:00
Vedran Pavic 79e2cb3ec1 Add config prop for JMS listener's sessionTransacted flag
This commit introduces `spring.jms.listener.session-transacted` property
in order to enable explicit configuration of `sessionTransacted` on the
`DefaultMessageListenerContainer`.

Prior to this commit, `sessionTransacted` would be configured implicitly
based on presence of `JtaTransactionManager`.

See gh-37473
2023-09-27 15:06:52 +01:00
Andy Wilkinson b7facec4a1 Rename spring.jms.listener.acknowledge-mode
Closes gh-37602
2023-09-27 14:41:09 +01:00
Andy Wilkinson 3adc70fd40 Polish "Add properties for JmsTemplate session's ack mode and transacted flag"
See gh-37500
2023-09-27 10:25:19 +01:00
Vedran Pavic 5ba4e2793d Add properties for JmsTemplate session's ack mode and transacted flag
See gh-37500
2023-09-27 10:19:45 +01:00
Andy Wilkinson b63efd17b8 Merge branch '3.1.x'
Closes gh-37595
2023-09-27 09:48:01 +01:00
Andy Wilkinson 5015327886 Merge branch '3.0.x' into 3.1.x
Closes gh-37594
2023-09-27 09:47:49 +01:00
Andy Wilkinson 6b107530f5 Polish "Use Neo4jManagedTypes to populate the mapping context"
See gh-37574
2023-09-27 09:33:56 +01:00
Michael Simons e0a5de01ca Use Neo4jManagedTypes to populate the mapping context
See gh-37574
2023-09-27 09:33:37 +01:00
Andy Wilkinson ecc670772a Make user details service auto-configs back off more readily
Previously auto-configuration of a user details service (imperative
or reactive) would only back off on the presence of certain beans.
This led to situations where the im-memory service was
auto-configured and the default password was logged even though
another authentication mechanism was in use.

This commit updates the auto-configuration so that it backs off
when depending on Spring Security's OAuth2 Client and OAuth2
Resource Server modules. In the imperative case it will also back
off when depending on the SAML 2 provider.

Closes gh-35338
2023-09-26 16:47:19 +01:00
Andy Wilkinson ab06d10d64 Fix checkpoint-restore with replaced or wrapped HikariDataSource
Closes gh-37580
2023-09-26 12:31:12 +01:00
Andy Wilkinson ee9c74556d Make reactive security back off without authentication manager
If there's no authentication manager bean or no bean from which
one can be created, Spring Security's reactive support may fail to
bootstrap due to a null authentication manager.

This commit causes the auto-configuration that enables WebFlux
security to back off in the absence of an AuthenticationManager bean
and a ReactiveUserDetailsService (from which Spring Security can
create an AuthenticationManager) bean. Other reactive security
auto-configuration that can configure things such that WebFlux security
can be bootstrapped without an AuthenticationManager has been updated
to enable WebFlux security rather than relying on another
auto-configuration class to do so.

Fixes gh-37504
2023-09-25 15:31:45 +01:00
Andy Wilkinson a7666ba8a5 Merge branch '3.1.x'
Closes gh-37554
2023-09-22 17:49:23 +01:00
Andy Wilkinson c838c707d8 Merge branch '3.0.x' into 3.1.x
Closes gh-37553
2023-09-22 17:44:44 +01:00
Andy Wilkinson e2982a3a07 Merge branch '2.7.x' into 3.0.x
Closes gh-37552
2023-09-22 17:44:30 +01:00
Andy Wilkinson feae7be0a1 Polish "Fix handling of JMS listener concurrency properties"
See gh-37180
2023-09-22 17:43:57 +01:00
Vedran Pavic 366607f517 Fix handling of JMS listener concurrency properties
Update JMS listener concurrency configuration to set the same minimum
and maximum number of consumers when users specify only the minimum
using `spring.jms.listener.concurrency` property.

Prior to this commit, when using `spring.jms.listener.concurrency` to
set the minimum number of consumers without also specifying
`spring.jms.listener.max-concurrency` would result in effective
concurrency where the actual minimum number of consumers is always 1,
while the maximum number of consumers is the value of
`spring.jms.listener.concurrency`.

See gh-37180
2023-09-22 17:43:56 +01:00
Vedran Pavic 433bd337f4 Rename JMS listener minimum concurrency property
This commit renames `spring.jms.listener.concurrency` property to
`spring.jms.listener.min-concurrency` in order to better align it with
`spring.jms.listener.max-concurrency`.

See gh-37451
2023-09-21 16:17:39 +02:00
Phillip Webb f55184a998 Update copyright year of changed files 2023-09-20 17:16:31 -07:00
Phillip Webb 2075f6c685 Merge branch '3.1.x' 2023-09-20 17:16:13 -07:00
Phillip Webb 78eb8f90d1 Merge branch '3.0.x' into 3.1.x 2023-09-20 17:12:27 -07:00
Phillip Webb 9b5062e5bb Merge branch '2.7.x' into 3.0.x 2023-09-20 17:06:55 -07:00
Phillip Webb b83e7b42bb Update copyright year of changed files 2023-09-20 16:05:44 -07:00
Moritz Halbritter cc214aac40 Merge branch '3.1.x'
Closes gh-37483
2023-09-20 11:30:42 +02:00
Moritz Halbritter b2dc52fc74 Merge branch '3.0.x' into 3.1.x
Closes gh-37482
2023-09-20 11:30:26 +02:00
Moritz Halbritter 5ec358099c Merge branch '2.7.x' into 3.0.x
Closes gh-37481
2023-09-20 11:29:38 +02:00
Moritz Halbritter 0ed455b058 Apply SAML2 sign-request even if metadata url is set
Closes gh-33747
2023-09-20 10:33:55 +02:00
Moritz Halbritter 8f52990c45 Merge branch '3.0.x' into 3.1.x
Closes gh-37457
2023-09-19 13:16:57 +02:00
Moritz Halbritter 99473362d8 Merge branch '2.7.x' into 3.0.x
Closes gh-37456
2023-09-19 13:16:40 +02:00
Moritz Halbritter 95690f7327 Fall back to all media types if encountering invalid Accept header
A warn log message is printed, and if log level is set to debug, the
exception stacktrace is logged, too.

Closes gh-37455
2023-09-19 09:52:02 +02:00
Moritz Halbritter bc7414d106 Merge branch '3.1.x' 2023-09-18 16:09:23 +02:00
Moritz Halbritter 7d505dc5b3 Polish JavaDoc 2023-09-18 15:27:07 +02:00
Johnny Lim 8f4ccb0535 Polish
See gh-37393
2023-09-15 11:44:06 +01:00
Moritz Halbritter 73c25d7156 Provide RestClientSsl as a bean
Closes gh-37400
2023-09-15 10:41:37 +02:00
Moritz Halbritter 3b15d46455 Use virtual threads on Spring Data Redis if enabled
Closes gh-35942
2023-09-14 14:30:47 +02:00
Andy Wilkinson 4f6e50b55a Make Spring Pulsar's Caffeine cache provider available to test compile
See gh-34763
2023-09-14 13:01:21 +01:00
Andy Wilkinson c5f7f11a13 Align with repackaging of CaffeineCacheProvider in Spring Pulsar
See gh-34763
2023-09-14 11:39:39 +01:00
Moritz Halbritter 92500720a7 Polish "Introduce configuration property for strict servlet compliance"
See gh-37242
2023-09-13 10:46:34 +02:00
Yanming Zhou 05b87c5fe8 Introduce configuration property for strict servlet compliance
The property is named spring.servlet.multipart.strict-servlet-compliance

See gh-37242
2023-09-13 10:42:22 +02:00
Johnny Lim c2b78830ff Polish
See gh-37340
2023-09-13 10:26:54 +02:00
Mahmoud Ben Hassine 626d858d81 Update Batch tests
Related to: https://github.com/spring-projects/spring-batch/issues/4245

Closes gh-37348
2023-09-12 14:05:15 +02: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
Andy Wilkinson 14a59a33dc Test that GraphQL QueryDSL auto-config backs off without Query DSL
See gh-34974
2023-09-11 15:00:22 +01:00
Moritz Halbritter e2d84fa462 Make SslStoreBundle implementations immutable
Closes gh-37222
2023-09-11 15:39:25 +02:00
Stephane Nicoll 078b399a93 Upgrade to Neo4j Java Driver 5.12.0
Closes gh-37324
2023-09-11 15:15:58 +02:00
Stephane Nicoll 18177451a9 Upgrade to Couchbase Client 3.4.10
Closes gh-37313
2023-09-11 15:15:57 +02:00
Brian Clozel c951c4c212 Polish GraphQL auto-configuration changes
This commit fixes build issues, as the recent changes surfaced an
existing problem: QueryDsl auto-configurations were not guarded by
classpath conditions for QueryDsl Core.

See gh-34974
2023-09-11 12:55:27 +02:00
Andy Wilkinson 4085425f91 Polish "Support unwrapping in ValidatorAdapter"
See gh-37119
2023-09-11 11:03:33 +01:00
Zisis Pavloudis eb6b151c41 Support unwrapping in ValidatorAdapter
See gh-37119
2023-09-11 10:42:32 +01:00
Andy Wilkinson 0242ba8a13 Merge branch '3.1.x' 2023-09-11 10:32:34 +01:00
Andy Wilkinson 7754dd290a Merge branch '3.0.x' into 3.1.x 2023-09-11 10:32:24 +01:00
Andy Wilkinson 994bafdfd9 Merge branch '2.7.x' into 3.0.x 2023-09-11 10:32:13 +01:00
Marten Deinum 5141e5c4ac Fix description of brokerUrl property in ArtemisProperties
Update description to refer to url instead of port.

See gh-37260
2023-09-11 10:31:19 +01:00
Stephane Nicoll 0206c30238 Upgrade to Couchbase Client 3.4.10
Closes gh-37297
2023-09-11 10:53:53 +02:00
Stephane Nicoll a52d7e255b Upgrade to Couchbase Client 3.4.10
Closes gh-37289
2023-09-11 10:51:59 +02:00
Brian Clozel 16940518c1 Polish GraphQL QueryBE and QueryDSL auto-configurations
Closes gh-34974
2023-09-08 17:52:42 +02:00
Brian Clozel 32b65e85ae Add config property for GraphQL Schema Mapping Inspection
This commit adds a new `spring.graphql.schema.inspection.enabled`
property, which is `true` by default.
This property enables the logging at the INFO level of the GraphQL
Schema inspection report.
During startup, Spring for GraphQL will inspect the schema and report
fields and registrations that are unmapped in the application.

Closes gh-36252
2023-09-08 14:58:24 +02:00
dkswnkk 1d7c0108d0 Capitalize order constant in TomcatWebServerFactoryCustomizer
See gh-37211
2023-09-08 11:28:29 +02:00
Andy Wilkinson ed5d16de84 Upgrade to Jetty 12
Closes gh-36073
2023-09-07 13:59:15 +01:00
Phillip Webb d9af7cec14 Merge pull request #37197 from onobc
* pr/37197:
  Polish 'Add Pulsar ConnectionDetails support'
  Add Pulsar ConnectionDetails support

Closes gh-37197
2023-09-06 12:26:59 -07:00
Phillip Webb 750c597225 Polish 'Add Pulsar ConnectionDetails support'
See gh-37197
2023-09-06 12:18:09 -07:00
Chris Bono 089fef0392 Add Pulsar ConnectionDetails support
Add `ConnectionDetails` support for Apache Pulsar and provide adapters
for Docker Compose and Testcontainers.

See gh-37197
2023-09-06 12:12:25 -07:00
Moritz Halbritter d84c81d18f Reduce logging in WelcomePageHandlerMapping on invalid Accept headers
Closes gh-37118
2023-09-06 14:23:27 +02:00
anessi 320dd0e24e Add virtual host support for Rabbit Stream
Add a new property 'spring.rabbitmq.stream.virtual-host' which can be
used to set a custom virtual host for streams.

See gh-37189
2023-09-06 10:17:51 +02:00
Chris Bono 6e7b845bdf Add support for Apache Pulsar
Add support for Apache Pulsar using the Spring for Apache Pulsar
project.

See gh-34763

Co-authored-by: Phillip Webb <pwebb@vmware.com>
2023-09-05 17:01:51 -07:00
Moritz Halbritter 8f78acd548 Merge branch '3.1.x' 2023-09-05 15:28:23 +02:00
Moritz Halbritter 1962f4ecb7 Merge branch '3.0.x' into 3.1.x 2023-09-05 15:24:25 +02:00
Moritz Halbritter a69ff3bd59 Merge branch '2.7.x' into 3.0.x 2023-09-05 15:21:51 +02:00
Moritz Halbritter 76e51bc92f Only enable needed Couchbase services in integration tests 2023-09-05 15:10:12 +02:00
Andy Wilkinson 41f66fa7ec Merge branch '3.1.x'
Closes gh-37159
2023-08-31 15:23:40 +01:00
Andy Wilkinson c7063af63a Merge branch '3.0.x' into 3.1.x
Closes gh-37158
2023-08-31 15:23:21 +01:00
Andy Wilkinson 67e1ee5dcf Fix ordering of Jetty's WebSocketUpgradeFilter
Closes gh-37115
2023-08-31 15:22:26 +01:00
Moritz Halbritter f1f4e9c008 Implement RestClientBuilderConfigurer
Closes gh-36265
2023-08-31 14:01:44 +02:00
Johnny Lim 30eacd553d Add Javadoc since for new setTaskExecutor method
See gh-37117
2023-08-30 11:30:23 +01:00
Stephane Nicoll 19df3934c6 Upgrade to Flyway 9.21.2
Closes gh-37076
2023-08-23 11:27:27 +02:00
Stephane Nicoll 0f20fc2bbe Merge branch '3.1.x' 2023-08-22 14:45:10 +02:00
Stephane Nicoll 10873b0e7c Merge branch '3.0.x' into 3.1.x 2023-08-22 14:45:02 +02:00
Stephane Nicoll e8d329d99f Polish 2023-08-22 14:44:02 +02:00
Moritz Halbritter 450cd712c9 Merge branch '3.1.x'
Closes gh-37016
2023-08-17 12:18:46 +02:00
Moritz Halbritter a6b63d285c Merge branch '3.0.x' into 3.1.x
Closes gh-37015
2023-08-17 12:18:11 +02:00
Moritz Halbritter d3816651ce Merge branch '2.7.x' into 3.0.x
Closes gh-37014
2023-08-17 12:02:33 +02:00
Moritz Halbritter dc62e5fbc3 Polish "Set max request header size on Netty when using HTTP/2"
See gh-36766
2023-08-17 11:50:18 +02:00
Nerses Aznauryan ee5b23bb02 Set max request header size on Netty when using HTTP/2
Fix an issue that server.max-http-request-header-size doesn't have an
effect on Netty server with http2 enabled.

See gh-36766
2023-08-17 11:47:01 +02:00
Stephane Nicoll 37467c79d0 Polish "Reuse JOOQ helper to determine the dialect to use"
See gh-36991
2023-08-16 15:56:16 +02:00
Ramil Sayetov 36b5500ad0 Reuse JOOQ helper to determine the dialect to use
See gh-36991
2023-08-16 15:51:44 +02:00
Scott Frederick 73874911ad Adapt to changes in Spring Data snapshots
See gh-36680
2023-08-15 14:30:16 -05:00
Stephane Nicoll 85b4362ec6 Adapt to change in Spring Framework snapshots 2023-08-15 17:08:29 +02:00
Phillip Webb 2ef2529c93 Refine Flyway extension mapping
Change `ConfigurationExtensionMapper` to a helper class that can
create a `Consumer` to use with the `PropertyMapper`.

See gh-36364
2023-08-14 09:25:58 -07:00
Phillip Webb 8edec21a6f Update copyright year of changed files 2023-08-13 20:44:44 -07:00
Phillip Webb 407fa780c8 Polish 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 155300525e Polish 2023-08-13 19:15:38 -07:00
Phillip Webb 848a61a3a8 Merge branch '3.0.x' into 3.1.x 2023-08-13 18:50:33 -07:00
Phillip Webb 9805723415 Update copyright year of changed files 2023-08-13 18:50:13 -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
Andy Wilkinson b581ab0d3a Upgrade to Flyway 9.21.1
Closes gh-36887
2023-08-09 20:45:32 +01:00
Andy Wilkinson 6c3c8398d0 Upgrade to Elasticsearch Client 8.9.0
Closes gh-36886
2023-08-09 20:45:31 +01:00
Andy Wilkinson 3c7d400f0d Merge branch '3.1.x'
Closes gh-36866
2023-08-09 13:01:43 +01:00
Andy Wilkinson cac157b2a6 Merge branch '3.0.x' into 3.1.x
Closes gh-36865
2023-08-09 13:01:33 +01:00
Andy Wilkinson 7c77668372 Merge branch '2.7.x' into 3.0.x
Closes gh-36864
2023-08-09 13:01:23 +01:00
Andy Wilkinson c1f2efe00c Document that spring.security.filter properties are Servlet-only
Closes gh-33551
2023-08-09 12:56:33 +01: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
Stephane Nicoll 38dbc644ae Add auto-configuration for JdbcClient
Closes gh-36579
2023-08-09 11:18:25 +02:00
Moritz Halbritter b5a48e926d Handle timeout of latch await in tests 2023-08-08 13:12:48 +02:00
Moritz Halbritter 62fb45f75f Replace contains/put/get pattern with computeIfAbsent 2023-08-08 13:12:47 +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
Stephane Nicoll acf6bb644a Merge branch '3.1.x'
Closes gh-36773
2023-08-07 14:09:07 +02:00
Stephane Nicoll 10fecc855c Merge branch '3.0.x' into 3.1.x
Closes gh-36772
2023-08-07 14:08:57 +02:00
Stephane Nicoll e7706b4201 Merge branch '2.7.x' into 3.0.x
Closes gh-36771
2023-08-07 14:08:48 +02:00
Stephane Nicoll 5e11bac1da Polish "Configure ActiveMQConnectionFactory properly without spring-jms"
See gh-36767
2023-08-07 14:05:31 +02:00
Eddú Meléndez bcfaad2cb8 Configure ActiveMQConnectionFactory properly without spring-jms
Previously, if spring-jms is not available and a non-pool connection
factory is requested (the default), no `CachingConnectionFactory` is
created. This commit makes sure to separate the two conditions, so
that a connection factory can be obtained even if spring-jms is not
on the classpath.

See gh-36767
2023-08-07 14:03:27 +02:00
Moritz Halbritter 1a8b8ce26e Revert "Revise synchronized blocks"
This reverts commit 497bbf9c2d.
2023-08-03 17:26:31 +02:00
Moritz Halbritter d93d05ade2 Revert "Use virtual threads in BackgroundPreinitializer if enabled"
This reverts commit 4bbc336321.
2023-08-03 17:24:56 +02:00
Marc Becker 36e31c0612 Add resource hints for MessageSource
This only registers the default locations, not the one users can provide
via 'spring.messages.basename'.

This is similar to the approach taken for schema.sql and data.sql
in class SqlInitializationScriptsRuntimeHints.

See gh-36682
2023-08-03 12:56:06 +01:00
Andy Wilkinson 8ce5fb5f06 Merge branch '3.1.x'
Closes gh-36701
2023-08-03 12:44:43 +01:00
Andy Wilkinson 664581eb90 Merge branch '3.0.x' into 3.1.x
Closes gh-36700
2023-08-03 12:44:26 +01:00
Andy Wilkinson c6dc505932 Auto-configure JsonpMapper even with user-defined transport
Closes gh-36698
2023-08-03 12:44:13 +01:00
Moritz Halbritter 4bbc336321 Use virtual threads in BackgroundPreinitializer if enabled
Closes gh-36695
2023-08-03 11:16:16 +02:00
Andy Wilkinson 48813a0e5b Merge branch '3.1.x'
Closes gh-36697
2023-08-03 10:11:43 +01:00
Andy Wilkinson 12a2c615a9 Merge branch '3.0.x' into 3.1.x
Closes gh-36696
2023-08-03 10:10:22 +01:00
Andy Wilkinson 803c155e69 Order default customizers so that they can be overridden
Closes gh-36674
2023-08-03 10:09:27 +01: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
Andy Wilkinson 77e382ec64 Polish "Add support for using an AuthTokenManager with Neo4j"
See gh-36650
2023-08-02 14:30:03 +01:00
Michael Simons 1f0a3901b2 Add support for using an AuthTokenManager with Neo4j
Neo4j Java driver introduced support for an `AuthTokenManager` that can
be used to define expiring tokens for authentication with a database.

This commit adds an `ObjectProvider<AuthTokenManager> authTokenManagers`
parameter to the corresponding auto configuration class. If the provider
resolves to a unique object, that `AuthTokenManager` will have precedence
over any static token.

See gh-36650
2023-08-02 14:30:03 +01:00
Stephane Nicoll a223834d57 Polish "Order auto-configured ProblemDetailsExceptionHandler beans"
See gh-36288
2023-08-02 15:28:01 +02:00
Maurice Zeijen 9955ee7e8a Order auto-configured ProblemDetailsExceptionHandler beans
Add `@Order(0)` to the WebMVC and Webflux
`ProblemDetailsExceptionHandler` beans. This makes it easier to create
custom `@ControllerAdvice` beans that must be ordered before or after
the `ProblemDetailsExceptionHandler`.

See gh-36288
2023-08-02 15:27:44 +02:00
Moritz Halbritter 3a9fadf30f Enable virtual threads for Kafka listener
Closes gh-36396
2023-08-02 10:59:19 +02:00
Scott Frederick f2ad08c292 Add since version to deprecated config properties
See gh-36482
2023-08-01 16:13:22 -05:00
Andy Wilkinson 806aa45279 Merge branch '3.1.x'
Closes gh-36661
2023-08-01 18:14:03 +01:00
Andy Wilkinson 0d646d7c26 Polish "Support ServiceConnection beans in slice tests"
See gh-36037
2023-08-01 18:12:53 +01:00
Stephane Nicoll 75bb862255 Remove dead code 2023-08-01 16:51:48 +02:00
Moritz Halbritter 19859a9023 Simplify TaskExecutionAutoConfiguration 2023-08-01 15:40:05 +02:00
Moritz Halbritter 4ba7463d75 Polish 2023-08-01 15:34:52 +02:00
Moritz Halbritter 51008a7d39 Add ThreadPoolTaskSchedulerBuilder and deprecate TaskSchedulerBuilder
Closes gh-36651
2023-08-01 10:32:58 +02:00
Stephane Nicoll 922f66a85d Merge branch '3.1.x'
Closes gh-36654
2023-07-31 17:16:17 +02:00
Michael Simons ef3b99ee51 Fix test declaration in Neo4jAutoConfigurationTests
The test was annotated `@Bean`, must be `@Test`.

See gh-36649
2023-07-31 17:12:57 +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
Moritz Halbritter 1347b998e6 Remove @ConditionalOnVirtualThreads
See gh-36624
See gh-35892
2023-07-28 14:28:16 +02:00
Moritz Halbritter 9e212875c3 Remove VirtualThreads bean
Reverts eeb1e1fc35

See gh-36615
See gh-36387
2023-07-28 14:28:15 +02:00
Moritz Halbritter bf48819222 Implement @ConditionalOnThreading
Closes gh-36624
2023-07-28 14:28:15 +02:00
Moritz Halbritter b1a3dad16c Configure virtual threads on the RabbitMQ listener
Closes gh-36387
2023-07-27 16:32:53 +02:00
Moritz Halbritter eeb1e1fc35 Add VirtualThreads bean and auto-configuration
This bean is only in the context if virtual threads are enabled. It can
be used to get access to the virtual thread executor.
2023-07-27 16:32:51 +02:00