Commit Graph
732 Commits
Author SHA1 Message Date
Stéphane Nicoll 5399793faf Reinstate Spock support
Closes gh-48513
2025-12-19 15:31:59 +01:00
Andy Wilkinson dfd41a6b9f Polish "Add LDAPS support to embedded LDAP server"
See gh-48315
2025-12-19 11:26:02 +00:00
CatiaCorreia 0934edf556 Add LDAPS support to embedded LDAP server
Signed-off-by: CatiaCorreia <catia.correia97@gmail.com>

See gh-48315
2025-12-19 11:25:52 +00:00
Stéphane Nicoll 46f653504b Polish "Use Charset instead of String for Mustache templates support"
This replaces the use of charset name for our Mustache support.

See gh-48347
2025-12-19 12:21:55 +01:00
djlee 0ac7068f9d Use Charset instead of String for Mustache templates support
The MustacheResourceTemplateLoader previously defined the template
encoding as a String, defaulting to "UTF-8". This change replaces the
field with a Charset and initializes it with StandardCharsets.UTF_8.

Using Charset improves type safety and aligns with modern Spring Boot
standards, while avoiding implicit charset lookup issues.

See gh-48347

Signed-off-by: djlee <ddongjunn@gmail.com>
2025-12-19 12:21:55 +01:00
Stéphane Nicoll d0fed0ea6b Fix formatting
See gh-47802
2025-12-19 11:58:02 +01:00
Moritz Halbritter b3a4ddbbfd Merge branch '4.0.x'
Closes gh-48586
2025-12-19 11:55:28 +01:00
Moritz Halbritter 77807f53ee Add dependency to spring-boot-opentelemetry module
Closes gh-48585
2025-12-19 11:53:14 +01:00
Stéphane Nicoll e3ae9100c6 Polish "Associate MeterConventions for JVM and system metrics"
See gh-47935
2025-12-19 11:48:25 +01:00
Dmytro Nosan 8abff71009 Associate MeterConventions for JVM and system metrics
This commit auto-configures the following beans with their corresponding
conventions, when available:

- ProcessorMetrics with JvmCpuMeterConventions
- JvmMemoryMetrics with JvmMemoryMeterConventions
- JvmThreadMetrics with JvmThreadMeterConventions
- ClassLoaderMetrics with JvmClassLoadingMeterConventions

See gh-47935

Signed-off-by: Dmytro Nosan <dimanosan@gmail.com>
2025-12-19 11:48:25 +01:00
Stéphane Nicoll 9602be20aa Polish contribution
See gh-47802
2025-12-19 11:46:52 +01:00
Lansana DIOMANDE b8cefd2b9c Add support for configuring additional PersistenceUnitPostProcessor
See gh-47802

Signed-off-by: Lansana DIOMANDE <lansana.diomande@epfedu.fr>
2025-12-19 11:46:51 +01:00
Stéphane Nicoll 30a56c2de9 Polish "Add support for configuring SimpleMessageListenerContainer"
See gh-47716
2025-12-19 11:42:48 +01:00
Vedran Pavic 98d843214b Add support for configuring SimpleMessageListenerContainer
This commit introduces a `SimpleJmsListenerContainerFactoryConfigurer`
that can be used to conveniently apply settings provided
by JMS auto-configuration to `SimpleJmsListenerContainerFactory`
instances.

See gh-47716

Signed-off-by: Vedran Pavic <vedran@vedranpavic.com>
2025-12-19 11:42:48 +01:00
Moritz Halbritter ce1efb02a1 Back off if spring-boot-micrometer-observation or spring-boot-micrometer-metrics is missing
Closes gh-48581
2025-12-19 11:25:32 +01:00
Stéphane Nicoll d489aa685c Polish "Update AOT tests to fail if deprecated code is not suppressed"
Include use of API that has been marked for removal.

See gh-48566
2025-12-17 15:41:26 +01:00
Stéphane Nicoll 8e895b3bc0 Update AOT tests to fail if deprecated code is not suppressed
Closes gh-48566
2025-12-17 15:30:44 +01:00
Stéphane Nicoll 15eaa461b2 Merge branch '3.5.x' 2025-12-17 15:01:27 +01:00
Craig Andrews f9f276bd46 JdbcSessionAutoConfiguration after DataSourceAutoConfiguration
JdbcSessionAutoConfiguration is conditional on the DataSource bean
which won't exist until after DataSourceAutoConfiguration; therefore,
JdbcSessionAutoConfiguration must auto-configure after
DataSourceAutoConfiguration.

Signed-off-by: Craig Andrews <candrews@integralblue.com>

See gh-48552
2025-12-17 10:32:41 +00:00
Stéphane Nicoll 2754aaef57 Suppress warnings in JsonMixin AOT-generated code
Closes gh-48564
2025-12-17 09:41:09 +01:00
Andy WilkinsonandChristoph Strobl 1a4426a369 Temporarily add hints needed for Hibernate 7.2
See gh-48518

Co-Authored-By: Christoph Strobl <christoph.strobl@broadcom.com>
2025-12-16 12:15:27 +00:00
Andy Wilkinson 495467dca6 Make OTLP logging connection details back off
Previously, the connection details would only back off if another
PropertiesOtlpLoggingConnectionDetails was defined. This commit
corrects this so that they will back of if any
OtlpLoggingConnectionDetails implementation is defined as a bean.

Closes gh-48536
2025-12-16 08:42:18 +00:00
Kai Zander fb05d82650 Fix order comment in WebMvcWebApplicationTypeDeducer
See gh-48543

Signed-off-by: Kai Zander <61500114+kzander91@users.noreply.github.com>
2025-12-16 09:14:34 +01:00
Phillip Webb da516741b2 Consider modules when deducing WebApplicationType
Introduce a strategy to `WebApplicationType` to allow modules to
implement deduction logic.

Prior to this commit, modules played no part in deducing the
`WebApplicationType`. This meant that a user with `spring-webflux`
for client purposes would deduce `REACTIVE` despite no
`spring-boot-webflux` module being present.

The following deduction logic order is now implemented:

1) If the `spring-boot-webmvc` module is being used and Spring MVC
   classes are found then `SERVLET` is used.

2) If the `spring-boot-webflux` module is being used and Spring WebFlux
   classes are found then `REACTIVE` is used.

3) If `spring-web` is found and servlet classes are available then
   `SERVLET` is used.

4) If none of the above are satisfied, `NONE` is used.

This commit also updates `SpringBootTestContextBootstrapper` to use
the same deduction logic.

Fixes gh-48517
2025-12-15 20:30:16 -08:00
Stéphane Nicoll 134ebe42a7 Merge branch '3.5.x'
Closes gh-48532
2025-12-15 15:15:11 +01:00
Andy Wilkinson 7b0abcbdb2 Decouple Session auto-configuration from ServerProperties
Fixes gh-48493
2025-12-11 15:34:22 +00:00
Brian Clozel 192efca36e Move ConditionalOnEnabledLoggingExport to opentelemetry module
This commit moves the `ConditionalOnEnabledLoggingExport` condition from
the "spring-boot-actuator-autoconfigure" to the
"spring-boot-opentelemetry" one, because without that the logging export
feature requires the actuator module to be on the classpath.

Fixes gh-48488
2025-12-10 12:40:44 +01:00
Stéphane Nicoll 72afdfd94a Merge branch '3.5.x'
Closes gh-48487
2025-12-10 10:24:08 +01:00
Tran Ngoc Nhan d00cb0b282 Allow Info to be built with null map values
See gh-48480

Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
2025-12-09 10:47:42 -08:00
Phillip Webb 1573104dfc Allow Info to be built with null map values
Fixes gh-48401
2025-12-08 11:55:37 -08:00
Stéphane Nicoll 14a67f7c6e Polish "Upgrade to Tomcat 11.0.15"
See gh-48467
2025-12-08 17:42:49 +01:00
Stéphane Nicoll 39b64a76c6 Upgrade to jOOQ 3.19.29
Closes gh-48464
2025-12-08 16:24:51 +01:00
Stéphane Nicoll a98b36efbb Start building against Spring Framework 7.0.2 snapshots
See gh-48439
2025-12-08 14:54:53 +01:00
Phillip Webb 2639d1ead5 Allow Info to be built with null values
Fixes gh-48401
2025-12-05 13:11:54 -08:00
Phillip Webb 739b92e525 Consider reactive indicators in HealthEndpointGroupMembershipValidator
Update `HealthEndpointGroupMembershipValidator` to also consider
reactive health indicators.

Fixes gh-48387
2025-12-04 14:09:21 -08:00
Phillip Webb e93f9c313c Guard against WebServerApplicationContext not being present
Update security matchers and WebFlux actuator support to guard against
the `WebServerApplicationContext` class not being present.

Fixes gh-48388
2025-12-03 22:41:32 -08:00
Brian Clozel 50f64f947a Separate client and server HttpMessageConverters
Prior to this commit, the  `HttpMessageConverters` auto-configuration
would pick up `HttpMessageConverter<?>` beans from the context and
broadly apply them to both server and client converters setup.

This can cause several types of problems.
First, specific configurations only meant for server setup will also be
applied to the client side. For example, the Actuator JSOn configuration
is only meant to be applied to the server infrastructure.

Also, picking up converters from the context does not convey whether
such converters are meant to override the default ones or should be
configured as custom, in addition to the defaults.
For example, a bean extending `JacksonJsonHttpMessageConverter` can be
both meant to override the default with `builder.withJsonConverter` or
meant as an additional converter with `builder.addCustomConverter`.

This commit ensures that the auto-configurations contribute
`ClientHttpMessageConvertersCustomizer` and
`ServerHttpMessageConvertersCustomizer` beans instead of converter beans
directly. Applications can still contribute such beans and those will be
used.

Fixes gh-48310
2025-12-01 15:17:31 +01:00
Andy Wilkinson e1d85b3678 Apply default property inclusion to content
Previously, the setting was only applied to values. This worked
for POJOs but had no effect on maps.

Fixes gh-48343
2025-12-01 10:57:11 +00:00
Stéphane Nicoll e9db595c67 Restore TestRestTemplate#getRootUri
This commit adapts TestRestTemplate#getRootUri to the recently
introduced LocalTestWebServer. The behavior invokes the
UriTemplateHandler to provide the value. If the implementation expands
full URL, then it will provide the expected behavior. If not, it should
return the empty string as before.

Closes gh-48330
2025-11-28 14:44:50 +01:00
Andy Wilkinson c6c6ff0103 Merge branch '3.5.x'
Closes gh-48328
2025-11-28 10:09:05 +00:00
Andy Wilkinson 7946f0e831 Merge branch '3.5.x'
Closes gh-48325
2025-11-28 09:44:43 +00:00
Andy Wilkinson c3e51d32b8 Allow a JwtTypeValidator bean to override Security's default
A change in Spring Security [1] means that type validation is now
performed by default by Spring Security. A breaking side-effect of
this is that setting validateTypes to false no longer has an effect
and the default JwtTypeValidator is still present. Its presence,
wrapped in a DelegatingOAuth2TokenValidator, prevents a user's
JwtTypeValidator bean from being used for type validation.

This commit updates Boot's auto-configuration to change how the
type validators are created. We avoid wrapping in a
DelegatingOAuth2TokenValidator so that the user's custom
JwtTypeValidator can be detected and used in place of the default.
This requires us to create the JwtIssuerValidator rather than using
the createDefaultWithIssuer method as it does not allow additional
validators to be provided.

Fixes gh-48301

[1] https://github.com/spring-projects/spring-security/commit/6d3b54df21ec0cffc30c8b3e0784220bd117a87d
2025-11-27 14:18:10 +00:00
Stéphane Nicoll 4feb1faf3a Polish "Relax conditions to create HttpService client with RestClient"
See gh-48274
2025-11-27 09:54:50 +01:00
Nhahan a2160f793b Relax conditions to create HttpService client with RestClient
Previously, HttpServiceClientAutoConfiguration used
NotReactiveWebApplicationCondition, which prevented
activation in reactive apps even when virtual threads
were enabled.

This commit removes the condition to follow suite with what was done in
gh-48308

See gh-48274

Signed-off-by: Nhahan <kisy324@naver.com>
2025-11-27 09:54:04 +01:00
Stéphane Nicoll 2336cddb1f Relax conditions to create RestClient infrastructure
Previously, the necessary infrastructure to create a RestClient was only
configured in a servlet-based application or in a reactive application
if virtual threads are enabled.

While this extra care was important in
Spring Boot 4 as the aut-configuration is always available, this is no
longer the case with Spring Boot 4. Indeed, an explicit module has to be
added to the classpath now.

This commit therefore relaxes the condition. If the module has been
added, then the infrastructure is auto-configured.

Closes gh-48308
2025-11-27 09:38:24 +01:00
Stéphane Nicoll 72eaeecd5c Allow other configures to run before PropertiesRestClientHttpServiceGroupConfigurer
Closes gh-48296
2025-11-26 16:06:24 +01:00
Andy Wilkinson 3e82ede609 Require spring-boot-restclient dependency to use TestRestTemplate
Previously, spring-boot-restclient was a required dependency of
spring-boot-resttestclient. This had the unwanted side-effect of
increasing the risk of the test classpath enabling auto-configuration
for RestClient.Builder when it was main code that needed such a bean.
This could lead to integration tests passing but the application
itself failing to start when its run through its main method.

This commit makes spring-boot-restclient an optional dependency of
spring-boot-resttestclient. As a result, a dependency on
spring-boot-resttestclient is no longer sufficient to auto-configure
a RestClient.Builder bean, although it is still sufficient to
auto-configure a RestTestClient bean.

Those that wish to use TestRestTemplate rather than migrating to
RestTestClient will now have to add a dependency on
spring-boot-restclient. This makes it presence more obvious. It now
has to be declared directly rather than being somewhat hidden due to
being pulled in transitively. The hope is that this will reduce the
chances of the dependency being accidentially on the test classpath
when main code requires it to be on the runtime classpath.

Fixes gh-48253
2025-11-25 14:38:33 +00:00
Maurice Zeijen a39adff3eb Corrected ProblemDetail mixin for XmlMapper.Builder
The ProblemDetailXmlMapperBuilderCustomizer applied the wrong
ProblemDetail mixin for the Jackson XmlMapper. Namely the
ProblemDetailJacksonMixin, which is intended for JSON.
Now the ProblemDetailJacksonXmlMixin is used instead.
The corresponding test also tested for the wrong XML output,
which has been adjusted.

Fixes gh-48222

Signed-off-by: Maurice Zeijen <mzeijen@bol.com>
2025-11-24 09:57:43 +01:00
Stéphane Nicoll 76cccc5842 Document correct replacement for spring.jackson.parser
See gh-48255
2025-11-23 20:03:33 +01:00
michaldo 6ad521cdfc Document correct replacement for spring.jackson.generator
See gh-48255

Signed-off-by: michaldo <michaldo@github.com>
2025-11-23 20:03:06 +01:00