57 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
Andy Wilkinson 0f2500898c Merge branch '4.1.x'
Closes gh-51640
2026-09-09 08:21:24 +01:00
Andy Wilkinson e383449a5d Merge branch '4.0.x' into 4.1.x
Closes gh-51639
2026-09-09 08:21:12 +01:00
Andy Wilkinson 06c0fa8d5c Retain WebFlux's default SameSite when property not set
Fixes gh-51636
2026-09-09 08:18:47 +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
Andy Wilkinson 682816229a Merge branch '4.1.x'
Closes gh-51577
2026-09-04 10:07:51 +01:00
Andy Wilkinson c38c15b3b7 Merge branch '4.0.x' into 4.1.x
Closes gh-51576
2026-09-04 09:53:28 +01:00
Vladimir Sitnikov ff3086700b Fix unrecognized JSpecify nullable annotations
Signed-off-by: Vladimir Sitnikov <sitnikov.vladimir@gmail.com>

See gh-51555
2026-09-04 09:40:47 +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
Andy Wilkinson 6a74bb85a3 Merge branch '4.0.x'
Closes gh-50440
2026-05-14 15:03:44 +01:00
Andy Wilkinson add52b6ccd Merge branch '3.5.x' into 4.0.x
Closes gh-50439
2026-05-14 15:02:24 +01: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 e434ee17ca Fix WebFlux test Timezone issue
Fix test that fails in certain timezones.

See gh-8923
2026-04-07 22:20:03 -07:00
Moritz Halbritter a04b65ea74 Set embeddedValueResolver on WebConversionService
Closes gh-8923
2026-04-02 08:57:22 +02:00
Stéphane Nicoll c747c9c53d Polish "Add configuration for HTML escaping configuration with WebFlux"
See gh-49791
2026-03-26 15:11:36 +01:00
husseinvr97 59f8dca1a4 Add configuration for HTML escaping configuration with WebFlux
See gh-49791

Signed-off-by: husseinvr97 <husseinmustafabas05@gmail.com>
2026-03-26 15:11:19 +01:00
Brian Clozel 26edf79084 Merge branch '3.5.x' into 4.0.x 2026-03-19 09:40:05 +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 dd51ece7ac Merge branch '3.5.x' into 4.0.x
Closes gh-49302
2026-02-23 18:34:48 +01:00
Andy Wilkinson 9c6d1d2944 Make additional health paths back off without health module
Fixes gh-49196
2026-02-12 10:31:00 +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
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 9bd1a460a1 Correct packaging of test code
Closes gh-48699
2026-01-08 11:43:43 +00:00
Phillip Webb a4f35688aa Merge branch '3.5.x' into 4.0.x 2026-01-06 12:54:11 -08: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
Phillip Webb 183d765b4d Support actuator with Jackson 2 only
See gh-47688
2025-10-17 13:17:19 -07: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
Moritz Halbritter 8236fa2f42 Add nullability annotations to tests in module/spring-boot-webflux
See gh-47263
2025-10-15 16:58:21 +02:00
Phillip Webb 34e0382858 Move actuator heath code to spring-boot-health
Closes gh-46357
2025-10-14 21:51:24 -07:00
Phillip Webb e01b36216a Revert Support pluggable types for EndpointJsonMapper
Closes gh-46534
2025-10-09 22:48:45 -07:00
Stéphane Nicoll 169b1b10b0 Allow CodecCustomizer to be used out-of-the-box with WebFlux
Closes gh-47397
2025-10-05 08:55:19 +02:00
Andy Wilkinson 5348880b69 Modularize spring-boot-test-autoconfigure
This commit modularizes spring-boot-test-autoconfigure. It now
contains only the code that's central to test auto-configuration.
Feature-specific functionality has moved out into -test modules,
some existing and some newly created. For example, `@DataJpaTest` can
now be found in spring-boot-data-jpa-test.

Closes gh-47322
2025-09-25 13:11:35 +01:00
Phillip WebbandMoritz Halbritter 239f384ac0 Update PropertyMapper to better support nullability
Refactor `PropertyMapper` so that it no longer calls adapter or
predicate methods by default when the source value is `null`. This
effectively makes all default calls the same as using
`alwaysWhenNotNull` in the previous generation of the code.

For the limited times when you do need to deal with `null` values, the
new `always()` method can be used.

For example,

	map.from(source::method).to(destination::method);

Will not call `destination.method(...)` if `source.method()` returns
`null`.

Where as:

	map.from(source::method).always().to(destination::method);

Will call  `destination.method(null)` if `source.method()` returns
`null`.

This update provides clearer semantics for the API and allows for better
JSpecify nullability annotations. It has also simplified much of our
existing property mapper code.

Closes gh-47024

Co-authored-by: Moritz Halbritter <moritz.halbritter@broadcom.com>
2025-09-05 14:43:33 -07:00
Andy Wilkinson d353038c58 Update Jackson support to require Jackson 3
Closes gh-45535
2025-09-02 11:37:09 +01:00
Andy Wilkinson fe371aba17 Start building against Spring Framework 7.0.0-M9 snapshots
See gh-47008
2025-08-29 17:19:34 +01:00
Moritz Halbritter 3dba915c01 Improve null-safety of module/spring-boot-webflux
See gh-46926
2025-08-28 09:40:23 +02:00
Moritz Halbritter 0d192347fd Improve null-safety of module/spring-boot-webflux
See gh-46926
2025-08-26 14:22:56 +02:00
Phillip Webb 7140be8751 Rename metrics, observation, and tracing modules
Rename modules to include 'micrometer'.

Closes gh-46925
2025-08-20 16:05:11 -07:00