Commit Graph

276 Commits

Author SHA1 Message Date
Andy Wilkinson 3becdc7d47 Move server.error properties to spring.web.error
Closes gh-48201
2025-11-20 11:55:23 +00:00
Andy Wilkinson 81ec7aeb70 Fix clashing bean name with JsonTest and Jacksons 2 and 3
Fixes gh-48198
2025-11-20 09:14:46 +00:00
Phillip Webb 2685f4bf29 Change tomcat and jetty runtime modules to starters
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Trigger Docs Build (push) Blocked by required conditions Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:25], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:25], map[id:windows-latest name:Windows]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:17], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:17], map[id:windows-latest name:Windows]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:21], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:21], map[id:windows-latest name:Windows]) (push) Waiting to run Details
Run CodeQL Analysis / run-analysis (push) Waiting to run Details
Run System Tests / Java ${{ matrix.java.version}} (map[toolchain:true version:17]) (push) Waiting to run Details
Run System Tests / Java ${{ matrix.java.version}} (map[toolchain:true version:21]) (push) Waiting to run Details
Change `spring-boot-tomcat-runtime` and `spring-boot-jetty-runtime`
into starter POMs and reduce the number of dependencies needed for
`spring-boot-tomcat` and `spring-boot-jetty`.

The runtime starters provide only the jars required to run the
embedded server along with the module jar itself (excluding transitive
dependencies) and `spring-boot-webserver` (excluding transitive
dependencies).

The build setup required for an executable jar is slightly different
between Maven and Gradle. For Maven, the regular module is put in the
`provided` scope. For Gradle, the regular module remains in main
configuration and the runtime jar is put in the `providedRuntime`
configuration. The reference documentation has been updated to
show how to configure things if starters are being used.

Manual testing has been performed to ensure that wars build with Maven
and Gradle work with both Tomcat and Jetty in both deployed and
`java -jar` modes.

Closes gh-48175
2025-11-19 21:59:03 -08:00
Moritz Halbritter 4af532b8ee Add starters for Micrometer Metrics
This commit adds spring-boot-starter-micrometer-metrics and
spring-boot-starter-micrometer-metrics-test.

It also uses the new starters in smoke tests and in other starters,
which depended on spring-boot-micrometer-metrics.

Closes gh-48161
2025-11-18 09:28:53 +01:00
Phillip Webb 2e54aa6760 Merge branch '3.5.x'
Closes gh-48160
2025-11-17 21:00:09 -08:00
Andy Wilkinson bb0437c0e1 Correct names of isolated Json/ObjectMapper properties
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Trigger Docs Build (push) Blocked by required conditions Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:25], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:25], map[id:windows-latest name:Windows]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:17], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:17], map[id:windows-latest name:Windows]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:21], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:21], map[id:windows-latest name:Windows]) (push) Waiting to run Details
Run CodeQL Analysis / run-analysis (push) Waiting to run Details
Run System Tests / Java ${{ matrix.java.version}} (map[toolchain:true version:17]) (push) Waiting to run Details
Run System Tests / Java ${{ matrix.java.version}} (map[toolchain:true version:21]) (push) Waiting to run Details
Closes gh-48116
2025-11-13 12:00:19 +00:00
Phillip Webb 619454548b Restore support for Jersey
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Trigger Docs Build (push) Blocked by required conditions Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:25], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:25], map[id:windows-latest name:Windows]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:17], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:17], map[id:windows-latest name:Windows]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:21], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:21], map[id:windows-latest name:Windows]) (push) Waiting to run Details
Run CodeQL Analysis / run-analysis (push) Waiting to run Details
Run System Tests / Java ${{ matrix.java.version}} (map[toolchain:true version:17]) (push) Waiting to run Details
Run System Tests / Java ${{ matrix.java.version}} (map[toolchain:true version:21]) (push) Waiting to run Details
Restore support for Jersey now that it supports JAX-RS 4.

Closes gh-47967

Co-authored-by: Andy Wilkinson <andy.wilkinson@broadcom.com>
2025-11-05 10:51:08 -08:00
Moritz Halbritter e9172d9f51 Split spring-boot-micrometer-tracing into Brave and OpenTelemetry specific module
Closes gh-47953
2025-11-05 12:14:13 +01:00
Stéphane Nicoll 724f706f34 Move auto-configuration for WebTestClient in autoconfigure
Closes gh-47892
2025-10-31 12:05:25 +01:00
Moritz Halbritter e071006f8e Remove spring-boot-micrometer-tracing from Actuator starter
Closes gh-47785
2025-10-29 15:31:14 +01:00
Stéphane Nicoll f3958ae9e7 Add Spring Kafka test utilities to Kafka test starter
Closes gh-47793
2025-10-29 08:28:58 +01:00
Stéphane Nicoll 20fdeae1a9 Add WebTestClient infrastructure to GraphQL test starter
Closes gh-47849
2025-10-28 15:07:34 +01:00
Stéphane Nicoll cd1424d04b Simplify dependencies arrangement in smoke tests
This commit harmonizes dependencies used in smoke tests, in particular
by using the starters consistently. This serves not only as a validation
but also a showcase of how to use them.

Closes gh-47836
2025-10-28 11:16:23 +01:00
Andy Wilkinson 198cba7177 Fix spring-boot-jackson2's test auto-configuration
This commit is a follow-on from 14c5ac0. It fixes a similar problem
with @AutoConfigureJsonTesters that is also apparent when using
@JsonTest.

Fixes gh-47811

The org.springframework.boot.test-auto-configuration plugin has been
added so that test auto-configuration imports files are checked at
build time, hopefully catching this sort of problem earlier in the
future.

Closes gh-47812
2025-10-27 10:04:25 +00:00
Andy Wilkinson f72da4c77a Fix Actuator with Jackson 2 but no spring-web
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Trigger Docs Build (push) Blocked by required conditions Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:25], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:25], map[id:windows-latest name:Windows]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:17], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:17], map[id:windows-latest name:Windows]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:21], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:21], map[id:windows-latest name:Windows]) (push) Waiting to run Details
Run CodeQL Analysis / run-analysis (push) Waiting to run Details
Run System Tests / Java ${{ matrix.java.version}} (map[toolchain:true version:17]) (push) Waiting to run Details
Run System Tests / Java ${{ matrix.java.version}} (map[toolchain:true version:21]) (push) Waiting to run Details
Previously, if Actuator was being used in a non-web app such that
spring-web was not on the classpath, the app would fail to start
if Jackson 2 was present. This occured as the auto-configuration
for the EndpointJackson2ObjectMapper tried to use spring-web's
Jackson2ObjectMapperBuilder that was not present.

This commit updates the auto-configuration to back off when
Jackson2ObjectMapperBuilder is absent, aligning it with the
behavior of JacksonEndpointAutoConfiguration in 3.5.

Fixes gh-47788
2025-10-24 14:39:47 +01:00
Andy Wilkinson 4e94f26935 Support JMX endpoints when only Jackson 2 is present
Closes gh-47688
2025-10-22 14:40:59 +01:00
Andy Wilkinson 635e766aaf Make it easier to create executable and deployable war
Closes gh-46944
2025-10-22 10:13:46 +01:00
Stéphane Nicoll aceaee89ee Polish "Replace `BaseUrl` with `LocalTestWebServer`"
See gh-47680
2025-10-21 11:08:48 +02:00
Phillip Webb 41a399c5ae Replace `BaseUrl` with `LocalTestWebServer`
Replace `BaseUrl` and `BaseUrlProvider` provider code with a more
targeted `LocalTestWebServer` class.

The `LocalTestWebServer` can be used to obtain the url of the locally
running server, or provide `UriBuilderFactory` or `UriBuilder`
instances base on it.

This commit also updates the MockMVC HTML Unit auto-configuration to
directly use `localhost` as the base URL.

Closes gh-47680
2025-10-20 17:44:51 -07:00
Stéphane Nicoll 9c969f91be Polish "Remove Spring Pulsar Reactive support"
See gh-47707
2025-10-20 18:15:34 +02:00
onobc 4aaa1dfb5f Remove Spring Pulsar Reactive support
This removes the auto-configuration for Spring Pulsar Reactive.

Consolidates the PulsarConfiguration into the PulsarAutoConfiguration because
there is no longer a need to factor out the common components between Spring
Pulsar and Spring Pulsar Reactive.

See gh-47707

Signed-off-by: onobc <chris.bono@gmail.com>
2025-10-20 18:15:34 +02:00
Stéphane Nicoll fad9a6e23e Merge branch '3.5.x' 2025-10-20 13:56:38 +02:00
Stéphane Nicoll 90804c8c2b Adapt @AutoConfigureHttpGraphQlTester to new testing infrastructure
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Trigger Docs Build (push) Blocked by required conditions Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:25], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:25], map[id:windows-latest name:Windows]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:17], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:17], map[id:windows-latest name:Windows]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:21], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:21], map[id:windows-latest name:Windows]) (push) Waiting to run Details
Run CodeQL Analysis / run-analysis (push) Waiting to run Details
Run System Tests / Java ${{ matrix.java.version}} (map[toolchain:true version:17]) (push) Waiting to run Details
Run System Tests / Java ${{ matrix.java.version}} (map[toolchain:true version:21]) (push) Waiting to run Details
This commit adapts @AutoConfigureHttpGraphQlTester to rely on the
auto-configured WebTestClient and stop triggering the configuration
of MockMvc.

Closes gh-47660
2025-10-19 17:46:11 +02:00
Stéphane Nicoll 3561b9db3c Polish 2025-10-19 17:27:07 +02:00
Phillip Webb 77f207a079 Simplify BaseUrl code and cache resolved URLs
See gh-47680
2025-10-17 19:28:18 -07:00
Phillip Webb e7f3ae19f8 Add Jackson 2 smoke tests
See gh-47688

Co-authored-by: Andy Wilkinson <andy.wilkinson@broadcom.com>
2025-10-17 13:17:37 -07:00
Stéphane Nicoll adb6481c62 Polish "Upgrade to Testcontainers 2.0.1"
See gh-47664
2025-10-17 17:23:35 +02:00
Eddú Meléndez 7f64615690 Upgrade to Testcontainers 2.0.1
* Update dependencies name
  Modules are prefixed with `testcontainers-`
* Update container classes
  Container classes are under `org.testcontainers.<module-name>` package

See gh-47664

Signed-off-by: Eddú Meléndez <eddu.melendez@gmail.com>
2025-10-17 17:11:24 +02:00
Stéphane Nicoll 998a2fa7b4 Fix configuration of HttpGraphQlTester with a running server
This commit restores the user of HttpGraphQlTester when it is configured
against a running server. The logic that appends the graphQl path to
the HTTP url was lost while refactoring the HTTP clients infrastructure.

To work against the new API, BaseUrl has been updated to provide the
ability to append a path to its URL

Closes gh-47659
2025-10-17 16:35:06 +02:00
Phillip Webb c2e68c0911 Refactor security auto-configuration package structure
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Trigger Docs Build (push) Blocked by required conditions Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:25], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:25], map[id:windows-latest name:Windows]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:17], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:17], map[id:windows-latest name:Windows]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:21], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:21], map[id:windows-latest name:Windows]) (push) Waiting to run Details
Run CodeQL Analysis / run-analysis (push) Waiting to run Details
Run System Tests / Java ${{ matrix.java.version}} (map[toolchain:true version:17]) (push) Waiting to run Details
Run System Tests / Java ${{ matrix.java.version}} (map[toolchain:true version:21]) (push) Waiting to run Details
Refactor security auto-configuration package structure and classes to
create distinct web configurations.

Closes gh-14412
2025-10-16 14:10:08 -07:00
Phillip Webb 61c8fa2e1c Remove support for Spring Session Hazelcast
Closes gh-47661
2025-10-16 10:42:14 -07:00
Phillip Webb c477d3b8b4 Remove support for Spring Session Data MongoDB
Closes gh-47662
2025-10-16 10:38:45 -07:00
Moritz Halbritter 41dc036ac7 Add nullability annotations to tests in smoke-test/spring-boot-smoke-test-xml
See gh-47263
2025-10-16 11:24:51 +02:00
Moritz Halbritter ecd3566d5f Add nullability annotations to tests in smoke-test/spring-boot-smoke-test-websocket-tomcat
See gh-47263
2025-10-16 11:24:51 +02:00
Moritz Halbritter 34ca46740d Add nullability annotations to tests in smoke-test/spring-boot-smoke-test-websocket-jetty
See gh-47263
2025-10-16 11:24:50 +02:00
Moritz Halbritter db1c0aa26f Add nullability annotations to tests in smoke-test/spring-boot-smoke-test-webservices
See gh-47263
2025-10-16 11:24:50 +02:00
Moritz Halbritter 3818c21eb3 Add nullability annotations to tests in smoke-test/spring-boot-smoke-test-webflux
See gh-47263
2025-10-16 11:24:50 +02:00
Moritz Halbritter 8fad79753c Add nullability annotations to tests in smoke-test/spring-boot-smoke-test-web-thymeleaf
See gh-47263
2025-10-16 11:24:50 +02:00
Moritz Halbritter 9120da277c Add nullability annotations to tests in smoke-test/spring-boot-smoke-test-web-static
See gh-47263
2025-10-16 11:24:50 +02:00
Moritz Halbritter 68da06fe86 Add nullability annotations to tests in smoke-test/spring-boot-smoke-test-web-secure-jdbc
See gh-47263
2025-10-16 11:24:50 +02:00
Moritz Halbritter 34cad95638 Add nullability annotations to tests in smoke-test/spring-boot-smoke-test-web-secure-custom
See gh-47263
2025-10-16 11:24:50 +02:00
Moritz Halbritter a1a7d8d989 Add nullability annotations to tests in smoke-test/spring-boot-smoke-test-web-secure
See gh-47263
2025-10-16 11:24:50 +02:00
Moritz Halbritter 233c421de5 Add nullability annotations to tests in smoke-test/spring-boot-smoke-test-web-mustache
See gh-47263
2025-10-16 11:24:50 +02:00
Moritz Halbritter eab04ea2cd Add nullability annotations to tests in smoke-test/spring-boot-smoke-test-web-security-method
See gh-47263
2025-10-16 11:24:49 +02:00
Moritz Halbritter c40ba46776 Add nullability annotations to tests in smoke-test/spring-boot-smoke-test-web-jsp
See gh-47263
2025-10-16 11:24:49 +02:00
Moritz Halbritter c9417eb277 Add nullability annotations to tests in smoke-test/spring-boot-smoke-test-web-groovy-templates
See gh-47263
2025-10-16 11:24:49 +02:00
Moritz Halbritter 34b1a89c82 Add nullability annotations to tests in smoke-test/spring-boot-smoke-test-web-freemarker
See gh-47263
2025-10-16 11:24:49 +02:00
Moritz Halbritter d394ef7fa0 Add nullability annotations to tests in smoke-test/spring-boot-smoke-test-web-application-type
See gh-47263
2025-10-16 11:24:49 +02:00
Moritz Halbritter 2d780f4e00 Add nullability annotations to tests in smoke-test/spring-boot-smoke-test-war
See gh-47263
2025-10-16 11:24:49 +02:00
Moritz Halbritter 7a33978cca Add nullability annotations to tests in smoke-test/spring-boot-smoke-test-traditional
See gh-47263
2025-10-16 11:24:49 +02:00