69 Commits
Author SHA1 Message Date
Andy Wilkinson 02cf5b8d0f Polish "Configure OpenTelemetry semantic conventions"
See gh-49241

Signed-off-by: Andy Wilkinson <andy.wilkinson@broadcom.com>
2026-09-17 10:18:17 +01:00
Tommy Ludwig 7d43f31732 Configure OpenTelemetry semantic conventions
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
2026-09-17 09:41:16 +01:00
Stéphane Nicoll 72524bcb9e Start building against Micrometer 1.18.0-M2 snapshots
See gh-51776
2026-09-16 15:22:23 +02:00
Wan bin yu 3aa96f2229 Support multi-segment additional health paths
Signed-off-by: Wan bin yu <3431359639@qq.com>

See gh-51470
2026-09-16 10:22:31 +01:00
Andy Wilkinson 57b44b0594 Merge branch '4.1.x'
Closes gh-51600
2026-09-07 08:27:14 +01:00
Andy Wilkinson ea613dc511 Merge branch '4.0.x' into 4.1.x
Closes gh-51599
2026-09-07 08:26:42 +01:00
Manu Sridharan 25a3f8feb9 Remove unnecessary NullAway suppressions
Signed-off-by: Manu Sridharan <msridhar@gmail.com>

See gh-51591
2026-09-07 08:18:11 +01:00
Brian Clozel b9fb384f8d Update Forwarded headers support for Framework
Prior to this commit, Spring Boot would auto-configure the
`ForwardedHeaderFilter`/`ForwardedHeaderTransformer` when the "NATIVE"
strategy is chosen.
Spring Framework now requires an explicit choice between the supported
HTTP header variants as of spring-projects/spring-framework#37072.

This commit adapts to this new behavior with the following:
* the "FRAMEWORK" strategy now only applies to Spring MVC and Spring
  WebFlux applications, since "NATIVE" strategies are now a good choice
  for most deployments.
* the format of HTTP headers is now configured with
  `spring.mvc.forwarded-headers.header-format` and
  `spring.webflux.forwarded-headers.header-format`, with additional
  options.

The default header format is now "X-Forwarded-*" for both NATIVE and
FRAMEWORK strategies. The reference documentation also reflects those
changes.

Closes gh-51030
2026-07-29 14:45:12 +02:00
Brian Clozel c06abc12ac Replace TestRestTemplate with RestTestClient in module tests
Before deprecating `TestRestTemplate`, we must first stop using it in
module tests and replace it with:
* `RestTestClient` when the Spring MVC infrastructure is present
* `RestClient` when the test does not have Spring MVC on classpath

See gh-46632
2026-07-27 16:13:10 +02:00
Stéphane Nicoll aba84a3850 Remove deprecated code
Closes gh-50955
2026-07-15 20:19:19 +02:00
gichanGim 728cbc67ff Make ResourceHandlerRegistrationCustomizer public
See gh-50877

Signed-off-by: gichanGim <k.kychan2003@gmail.com>
2026-07-15 13:27:18 +02:00
Phillip Webb ebce054028 Merge branch '4.0.x'
Closes gh-50266
2026-04-30 14:36:59 -07:00
Manu Sridharan 55a6b4525c Align @Nullable in returned Map with actual implementation
See gh-50265

Signed-off-by: Manu Sridharan <msridhar@gmail.com>

Closes gh-50265
2026-04-30 14:35:43 -07:00
Stéphane Nicoll ad1795bdc2 Merge branch '4.0.x'
Closes gh-50216
2026-04-25 10:40:20 +02:00
Stéphane Nicoll dfabb012e8 Merge branch '3.5.x' into 4.0.x
Closes gh-50215
2026-04-25 10:37:05 +02:00
Stéphane Nicoll 58c7a0f4e7 Merge branch '4.0.x'
Closes gh-50127
2026-04-20 08:21:39 +02:00
Stéphane Nicoll 1aaef07448 Apply API versioning path segment strategy last
This commit adapts the auto-configuration for API versioning to apply
the path segment last as this strategy is not meant to yield. It also
clarifies that configuration properties should not be used if ordering
of the strategies is important.

Closes gh-49800
2026-04-20 08:14:01 +02:00
Phillip Webb e1dd40a923 Fix test Timezone issue
Fix test that fails in certain timezones.

See gh-8923
2026-04-07 18:03:14 -07:00
Moritz Halbritter a04b65ea74 Set embeddedValueResolver on WebConversionService
Closes gh-8923
2026-04-02 08:57:22 +02:00
Brian Clozel 8bcb7fed18 Merge branch '4.0.x' 2026-03-19 09:40:36 +01:00
Brian Clozel 26edf79084 Merge branch '3.5.x' into 4.0.x 2026-03-19 09:40:05 +01:00
Brian Clozel 5b8246f9b7 Merge branch '4.0.x'
Closes gh-49647
2026-03-18 16:46:23 +01:00
Brian Clozel 1ead08b9d8 Merge branch '3.5.x' into 4.0.x
Closes gh-49646
2026-03-18 16:45:57 +01:00
Brian Clozel 228e885f01 Merge branch '4.0.x'
Closes gh-49303
2026-02-23 18:35:47 +01:00
Brian Clozel dd51ece7ac Merge branch '3.5.x' into 4.0.x
Closes gh-49302
2026-02-23 18:34:48 +01:00
Andy Wilkinson 0c8f95575e Merge branch '4.0.x'
Closes gh-49198
2026-02-12 10:31:17 +00:00
Andy Wilkinson 9c6d1d2944 Make additional health paths back off without health module
Fixes gh-49196
2026-02-12 10:31:00 +00:00
Stéphane Nicoll 01364b7099 Merge branch '4.0.x'
Closes gh-49027
2026-01-30 19:16:38 +01:00
Andy Wilkinson f8f1da605e Merge branch '4.0.x'
Closes gh-49011
2026-01-28 14:04:59 +00:00
Andy Wilkinson 5826200520 Delay removal of Jackson 2 support until 4.3.0 at the earliest
Closes gh-49010
2026-01-28 13:52:00 +00:00
Phillip Webb 0463b4d0bc Add @AutoConfigureWebServer test annotation
Introduce `@AutoConfigureWebServer` test annotation to support
`@SpringBootTest` with specific classes and a random port.

Closes gh-48815
2026-01-21 19:32:43 -08:00
Andy Wilkinson 4e6ce7b141 Merge branch '4.0.x'
Closes gh-48844
2026-01-15 14:31:24 +00:00
Andy Wilkinson 625571c3d1 Fix MVC and WebFlux validator creation in a native image
Following modularization, a presence check for ValidatorAdapter was
needed in the MVC and WebFlux auto-configuratiomn when creating
their Validators. Runtime hints to allow this check to work in a
native image were not added at the same time, resulting in the
class appearing to be absent. This caused message interpolation
for constraint violations to fail as newly created Validator was
being used which lacked the necessary MessageInterpolator
configuration.

This commit adds reflection hints for ValidatorAdapter, allowing
re-use of the context's main validator as the MVC and WebFlux
validators.

Fixes gh-48828
2026-01-15 14:12:33 +00:00
Andy Wilkinson ef1f4e2fa2 Merge branch '4.0.x'
Closes gh-48700
2026-01-08 12:01:09 +00:00
Andy Wilkinson 9bd1a460a1 Correct packaging of test code
Closes gh-48699
2026-01-08 11:43:43 +00:00
Phillip Webb 21cf377f7e Add 'WAR_SOURCE_DIRECTORY' environment variable support
Add an escape hatch for users that deviate from the standard
`src/main/webbapp` directory structure.

Fixes gh-23829
2026-01-05 16:44:45 -08: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
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
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
Andy Wilkinson 3becdc7d47 Move server.error properties to spring.web.error
Closes gh-48201
2025-11-20 11:55:23 +00:00
Stéphane Nicoll 3d23261f87 Merge branch '3.5.x'
Closes gh-48122
2025-11-13 14:55:19 +01:00
Stéphane Nicoll d1e5fe3248 Merge branch '3.5.x'
Closes gh-48106
2025-11-13 10:31:25 +01:00
Phillip Webb 827b0c14a9 Rename OnlyOnceLoggingDenyMeterFilter
Rename `OnlyOnceLoggingDenyMeterFilter` to
`MaximumAllowableTagsMeterFilter`.

Closes gh-47925
2025-11-03 20:56:28 -08:00
Phillip Webb 7849474291 Merge branch '3.5.x'
Closes gh-47924
2025-11-03 20:41:23 -08:00
Andy Wilkinson bf8e0c45a8 Allow customizations of default customizers to be overridden
Previously, the default client and server HTTP message converter
customizers were ordered with lowest precedence. This made it
impossible to guarantee that another customizer would be able to go
after the default customizers, preventing their customizations from
being reliably overridden.

This commit updates the definitions of the default customizers to
order them at 0. This allows additional customizers to be ordered
either before or after them. Usage of the customizers is now always
ordered (previously Spring MVC's was not).

See gh-47798
2025-10-27 12:41:31 +00:00
Phillip Webb 183d765b4d Support actuator with Jackson 2 only
See gh-47688
2025-10-17 13:17:19 -07:00
Moritz Halbritter 73aa73f50d Add nullability annotations to tests in module/spring-boot-webmvc
See gh-47263
2025-10-16 11:24:40 +02:00
Phillip Webb cba4f7ae21 Consistently package mappings and exchanges classes
Mirror the package names used in actuator for classes to support
mappings and exchanges in `spring-boot-servlet`, `spring-boot-webmvc`
and `spring-boot-webflux`.

Closes gh-46217
2025-10-15 15:56:41 -07:00
Andy Wilkinson 55e7c83498 Allow modules to contribute to Devtools' default properties
Closes gh-44792
2025-10-15 20:19:02 +01:00