DevToolsDataSourceAutoConfiguration and DevToolsR2dbcAutoConfiguration
were only guarded by classes from the JDK and r2dbc-spi respectively.
When a single user-defined DataSource or ConnectionFactory bean was
present, their conditions went on to reference classes from
spring-boot-jdbc or spring-boot-r2dbc. Both are optional dependencies
of spring-boot-devtools, so startup failed with a NoClassDefFoundError
when they were absent.
This commit adds a class from each module to the class conditions.
Without the modules the conditions could never match, so this only
turns the failure into a back-off.
See gh-51872
Signed-off-by: Kosuke Yanagihara <11373191+ksky8864@users.noreply.github.com>
MariaDbEnvironment checked for MARIADB_ALLOW_EMPTY_PASSWORD, which the
official MariaDB image does not support. The documented variable is
MARIADB_ALLOW_EMPTY_ROOT_PASSWORD. As a result, a compose service that
used the documented variable started fine but Spring Boot failed with
"No MariaDB password found".
See gh-51870
Signed-off-by: ohchanKyu <okc0202@naver.com>
Restructured to spring.cache.caffeine.cache-mode with an enum that can
be "native" or "async". Also clarified in the documentation the scope
of the property and that custom caches are not affected.
See gh-51844
CaffeineCacheManager supports asynchronous caches backed by Caffeine's
AsyncCache via setAsyncCacheMode, which adds support for Cache.retrieve.
Add a spring.cache.caffeine.async property (default false) wired to
CaffeineCacheManager.setAsyncCacheMode in CaffeineCacheConfiguration.
See gh-51844
Signed-off-by: seonghun lee <harrisleesh@gmail.com>
ClassLoaderFilesResourcePatternResolver.isDeleted() calls
resource.exists() and resource.getURI() inside the loop over the
uploaded files, so both are repeated once per DELETED entry although
neither depends on the entry. Every resource lookup made while the
application context is being built goes through this method - about
1300 times per restart in the application I measured - so a session
that has accumulated 100 deleted files performs around 130 000 file
system lookups where 1300 are enough.
This commit hoists both calls out of the loop: the resource is
inspected at most once per call, on the first DELETED entry, and the
URI comparison then uses the cached value. The method still returns on
the first match and still reports a failing getURI() as an
IllegalStateException, so behaviour is unchanged.
The loop now walks the per-directory entry sets, which is what
ClassLoaderFiles.addAll() and RestartServer already do, instead of the
flattened view added in gh-46289. That view is wrapped in
Collections.unmodifiableSet(), whose iterator is shared JDK code; in a
running application its delegate calls are megamorphic and C2 stops
inlining them, which made restarts with many accumulated files and no
deletions slower than before gh-46289. isDeleted() returns a boolean,
so the visiting order of the entries cannot change its result.
Measured on a Spring Boot application driven through the remote restart
path (restart request to ApplicationReadyEvent), 12 JVMs per variant
and 20 restarts per JVM, medians:
100 source directories, 10 000 entries, 10 deleted: 278 ms -> 200 ms
100 source directories, 10 000 entries, 100 deleted: 891 ms -> 201 ms
100 source directories, 10 000 entries, 500 deleted: 3536 ms -> 200 ms
100 source directories, 50 000 entries, none deleted: 431 ms -> 341 ms
100 source directories, 10 000 entries, none deleted: 202 ms -> 192 ms
no uploaded files: 150 ms -> 148 ms
See gh-51841
Signed-off-by: DongHoon Lee <dhl1924@naver.com>
Adds a management.observations.conventions property to control which
set of conventions are auto-configured across the application.
Configures WebMvc and WebFlux ServerRequestObservationConvention
beans to switch to OpenTelemetry conventions when configured.
Configures JVM and system meter binders using their builder APIs to
apply OpenTelemetry conventions while still allowing individual
meter conventions to be overridden via beans.
Signed-off-by: Tommy Ludwig <8924140+shakuzen@users.noreply.github.com>
See gh-49241
Spring Kafka 4.2 adds ContainerProperties#setAwaitAsyncResultsOnStop:
when the container stops, in-flight asynchronous listener results
(CompletableFuture, Mono, Kotlin suspend functions) are awaited within
the shutdown timeout and cancelled afterwards, so that listener work
does not outlive the container.
This commit adds spring.kafka.listener.await-async-results-on-stop so
that this can be enabled with configuration rather than a
ContainerCustomizer.
See gh-51774
Signed-off-by: Nikita Kibitkin <nikita.n.kibitkin@gmail.com>
This commit adds a spring.kafka.listener.admin and
spring.kafka.template.admin namespace with similar configuration
properties than spring.kafka.admin, used to create the KafkaAdmin bean.
When a property is configured in those two namespaces, a dedicated
KafkaAdmin is created and associated with the relevant component.
Closes gh-38830
This commit introduces a centralized way of building Kafka config
properties, and deprecate the equivalent in KafkaProperties. This
also removes the customization done in auto-configuration so that
KafkaConfigBuilder is the sole source mapping.
KafkaConfigBuilder also takes care of applying ConnectionDetails if
necessary.
Closes gh-51769