Commit Graph

5082 Commits

Author SHA1 Message Date
Phillip Webb a49719d73e Use consistent exception messages in Assert calls
Update `Assert` calls to consistently use messages of the form
"'item' must [not] ...".

Closes gh-43780
2025-01-11 21:18:47 -08:00
Phillip Webb f08188d5cf Change relevant Assert calls to throw IllegalStateException
Change certain Assert class from `assert...` to `assertState`
so that a more appropriate `IllegalStateException` is thrown.

Fixes gh-43779
2025-01-11 21:16:36 -08:00
Phillip Webb 29baaf32e6 Merge branch '3.4.x' 2025-01-11 10:26:06 -08:00
Phillip Webb 8c3e8605c2 Merge branch '3.3.x' into 3.4.x 2025-01-11 10:25:57 -08:00
Phillip Webb b9efd591e5 Polish "Prevent redis pool to initialize in unit test"
See gh-43774
2025-01-11 10:25:46 -08:00
Stéphane Nicoll 46a499bf1f Make RuntimeHints predicates more explicit
This commit narrows method invocation wherever applicable as the default
is 'introspect' only.
2025-01-11 18:17:10 +01:00
Stéphane Nicoll ae83f7e229 Merge branch '3.4.x'
Closes gh-43776
2025-01-11 12:54:38 +01:00
Stéphane Nicoll e061bb4777 Merge branch '3.3.x' into 3.4.x
Closes gh-43775
2025-01-11 12:53:03 +01:00
Stéphane Nicoll 7b04cddf1d Polish "Prevent redis pool to initialize in unit test"
See gh-43774
2025-01-11 12:51:21 +01:00
He Zean 911a9a14ea Prevent redis pool to initialize in unit test
See gh-43774

Signed-off-by: He Zean <realhezean@gmail.com>
2025-01-11 12:50:46 +01:00
Phillip Webb b48ce96746 Update copyright year of changed files 2025-01-08 15:46:10 -08:00
Phillip Webb 52b9b8e711 Fix tests failing due to missing 'spring.jmx.enabled=true'
See gh-43706
2025-01-08 15:44:35 -08:00
Phillip Webb bd3663748b Restore matchIfMissing attribute
Restore accidentally deleted `matchIfMissing` attribute.

See gh-43704
2025-01-08 15:00:45 -08:00
Phillip Webb b448d5e0a7 Don't create unessary JMX beans
Align "spring.jmx.enabled" conditions by removing
`matchIfMissing = true`.

Closes gh-43706
2025-01-08 13:45:01 -08:00
Phillip Webb 7e194a0af6 Fix checkstyle issue 2025-01-08 13:44:46 -08:00
Phillip Webb 86b6171edc Introduce dedicated annotations to deal with boolean properties
Add `@ConditionalOnBooleanProperty` annotation to deal with
boolean properties and primarily for features that users toggle
using `.enabled` properties.

Closes gh-43704
2025-01-08 13:26:11 -08:00
Phillip Webb e4bcda258a Polish "Add spring.data.redis.lettuce.read-from property"
See gh-42588

Co-authored-by: Stephane Nicoll <stephane.nicoll@broadcom.com>
2025-01-07 16:49:42 +01:00
Dmytro Nosan fd115980e7 Add spring.data.redis.lettuce.read-from property
See gh-42588
2025-01-07 16:35:39 +01:00
Yanming Zhou 0d3e0245a2 Add support for configuring Tomcat connector's max parameter count
See gh-43286
2025-01-07 14:35:31 +01:00
Yanming Zhou 1ecf1f3c74 Remove unnecessary creation of DataSourceProperties
This commit removes the creation of DataSourceProperties in
DataSourceTransactionManagerAutoConfiguration as the latter does not
use the former.

See gh-43603
2025-01-07 12:38:24 +01:00
Dmytro Nosan 86ef089d16 Use SQLExceptionTranslator bean if defined
This commit improves the auto-configuration of JdbcTemplate and
HibernateJpaDialect so that an SQLExceptionTranslator bean is used if
it is available.

See gh-43511
2025-01-07 12:25:23 +01:00
Stéphane Nicoll ced7c1617c Polish "Add TaskDecorator support for scheduled tasks"
See gh-43190
2025-01-07 12:15:46 +01:00
Dmytro Nosan f0c5312141 Add TaskDecorator support for scheduled tasks
See gh-43190
2025-01-07 12:15:45 +01:00
Stéphane Nicoll e6af48fc20 Polish "Retain existing modules in JacksonAutoConfiguration"
See gh-42836
2025-01-07 11:58:47 +01:00
Dmytro Nosan 993fbb3a0d Retain existing modules in JacksonAutoConfiguration
Previously, the default Jackson2ObjectMapperBuilderCustomizer
implementation did set the list of modules to use. This had the effect
of removing any modules that were registered programmatically by a
customizer with higher precedence.

This commit uses the variant of modulesToInstall that retain any
existing modules. It also adds a note in the documentation as this
behavior can be easily missed.

See gh-42836
2025-01-07 11:56:20 +01:00
Phillip Webb 170ff4eb23 Update copyright year of changed files 2025-01-06 17:40:24 -08:00
Phillip Webb 4c307d6fda Switch away from using @ConditionalOnProperty prefix
Merge `prefix` into `name` attribute and simplify annotations
where possible.

Closes gh-43703
2025-01-06 14:37:18 -08:00
Stéphane Nicoll 97f9589404 Merge branch '3.3.x'
Closes gh-43604
2024-12-24 10:29:21 +01:00
Stéphane Nicoll 916705538e Polish "Add support for symlinks in FileWatcher"
See gh-43586
2024-12-24 10:22:52 +01:00
Tomasz Maciejewski 26ca3790b2 Add support for symlinks in FileWatcher
This commit allows using symlinks for SSL certificate hot reloading.

See gh-43586
2024-12-24 09:59:59 +01:00
Johnny Lim 81f67b13e6 Remove unused ScopedFooConfiguration in ConditionalOnMissingBeanTests
See gh-43592
2024-12-23 15:49:16 +01:00
Phillip Webb ef431609ab Merge branch '3.3.x'
Closes gh-43563
2024-12-18 10:44:28 -08:00
Phillip Webb ba916cb66e Allow KafkaProperties to build properties with empty bundle name
Update `KafkaProperties` so that properties can still be built when
the bundle name has no text.

Fixes gh-43561
2024-12-18 10:44:18 -08:00
Phillip Webb 4d6fc85c8e Merge branch '3.3.x' 2024-12-13 19:03:48 -08:00
Phillip Webb 45da43c6b4 Update copyright year of changed files 2024-12-13 19:03:43 -08:00
Johnny Lim 4d15ee5bf0 Polish
See gh-43498
2024-12-13 13:29:20 -08:00
Moritz Halbritter 8c20e6c1e9 Merge branch '3.3.x'
Closes gh-43497
2024-12-13 14:17:47 +01:00
Dmytro Nosan 1234409fbe Multiple WebFlux ResourceHandlerRegistrationCustomizer should be invoked
Before this commit, only a single ResourceHandlerRegistrationCustomizer
was invoked. This commit adds functionality to have more
than one ResourceHandlerRegistrationCustomizers

See gh-43494
2024-12-13 14:00:47 +01:00
Moritz Halbritter 61bab92231 Merge branch '3.3.x'
Closes gh-43484
2024-12-11 14:25:44 +01:00
Yanming Zhou a964bbd8cb Polish variable name for consistency
See gh-43483
2024-12-11 14:25:19 +01:00
Phillip Webb 565ec07046 Merge branch '3.3.x'
Closes gh-43448
2024-12-09 09:46:47 -08:00
Phillip Webb 3338c22372 Restore `build...` methods that don't need an SSL bundle
Restore `buildConsumerProperties()` and `buildProducerProperties()`
methods in `KafkaProperties` to make it more convenient to use them
without an SSL bundle.

Fixes gh-43300
2024-12-09 09:43:13 -08:00
Phillip Webb 86b0c768e7 Fix annotation matching when using scoped proxies
Update `OnBeanCondition` to check `isAutowireCandidate` on the original
bean of scoped proxy targets.

Fixes gh-43423
2024-12-05 18:05:23 -08:00
Phillip Webb 916efb632c Merge branch '3.3.x' 2024-12-04 15:04:22 -08:00
Phillip Webb 9e7972a9b4 Polish code with code cleanup rules 2024-12-04 15:03:40 -08:00
Phillip Webb 3ddfd62f16 Prefer file resolution when loading SSL content
Update `SslAutoConfiguration` so that the used resource loader prefers
file based resolution when paths are specified without a prefix. This
restores the behavior found in Spring Boot 3.3.

The `ApplicationResourceLoader` has been updated with a new `get` method
that accepts a `preferFileResolution` parameter. Unfortunately, we can't
directly influence the resource returned by the delegate
`ResourceLoader` since we can't override `getResourceByPath(...)`.
Instead we check if the returned type was likely to have been created
by a call to that method. If so, we change it to a `FileSystemResource`.

This approach should hopefully work with `DefaultResourceLoader` and
subclasses.

Fixes gh-43274
2024-12-03 15:00:15 -08:00
Phillip Webb 7a4e071709 Polish 2024-12-03 14:45:25 -08:00
Phillip Webb 91778e9f96 Merge branch '3.3.x'
Closes gh-43359
2024-12-02 19:05:21 -08:00
Phillip Webb b340c855c0 Prevent H2 console from causing early DataSource initialization
Update `H2ConsoleAutoConfiguration` so that DataSource connection
logging occurs outside of the `ServletRegistrationBean`.

Fixes gh-43337
2024-12-02 19:05:16 -08:00
Moritz Halbritter ff9fde0ef4 Polish "Make UserDetailsServiceAutoConfiguration conditional on servlet app"
See gh-43334
2024-12-02 13:40:51 +01:00