Commit Graph

335 Commits

Author SHA1 Message Date
Moritz Halbritter 9bb62a074b Add nullability annotations to tests in module/spring-boot-actuator
See gh-47263
2025-10-02 11:59:32 +02:00
Moritz Halbritter fe975214cd Add nullability annotations to tests in module/spring-boot-activemq
See gh-47263
2025-10-02 11:58:23 +02:00
Andy Wilkinson ee2730ca8d Stop an ObjectMapper from causing JsonMapper auto-config to back off
Previously, the auto-configured JsonMapper would back off when any
type of ObjectMapper was defined. Updating this was missed as part
of the move to Jackson 3 where both Boot and Framework now intend to
use the more specific JsonMapper type.

This commit updates the condition such that a JsonMapper will still
be auto-configured when any other type of ObjectMapper is definied.
It will now only back off when a JsonMapper bean is defined.

Closes gh-47379
2025-10-02 09:30:26 +01:00
Stéphane Nicoll b28d390c69 Rationalize SSL bundles in RedisConnectionDetails
This commit exposes a single ssl bundle rather than a specific bundle
for each of the three supported modes.

Closes gh-47375
2025-10-02 10:00:07 +02:00
Stéphane Nicoll e7ffa33d65 Remove unused file 2025-10-02 09:44:38 +02:00
Phillip Webb dadfd9a35d Add classic test starter
See gh-46356
See gh-47322
2025-10-01 21:55:38 -07:00
Phillip Webb 0ae23de2b5 Refine test module dependencies
See gh-46356
See gh-47322
2025-10-01 21:55:14 -07:00
Phillip Webb 2a521ce4e9 Remove `spring-boot-web-server-test` module
Remove the `spring-boot-web-server-test` module, adding
`SpringBootTestRandomPortContextCustomizerFactory` to
`spring-boot-web-server` as a replacement for
`SpringBootTestRandomPortApplicationListener`.

See gh-46356
See gh-47322
2025-10-01 21:54:54 -07:00
Phillip Webb 3cced515ce Remove unused HTML Unit classes
Remove `LocalHostWebClient` and `LocalHostWebConnectionHtmlUnitDriver`
in favor of `BaseUrl` versions.

See gh-46356
See gh-47322
2025-10-01 21:54:44 -07:00
Phillip Webb 279de9e807 Migrate to `BaseUrlUriTemplateHandler`
Remove `LocalHostUriTemplateHandler` and migrate existing code to use
`BaseUrlUriTemplateHandler`.

See gh-46356
See gh-47322
2025-10-01 21:54:32 -07:00
Phillip Webb 97c89b480f Move `@LocalServerPort` and `@LocalManagementServerPort`
Move `@LocalServerPort` and `@LocalManagementServerPort` back to
`spring-boot-test`. The should help reduce upgrade pain since these
annotations are fairly commonly used. It also removes the need for
depending on `spring-boot-webserver-test`.

This is slight compromise with the module structure, since the
web-server module usually contributes the properties referenced
by the annotations.

See gh-46356
See gh-47322
2025-10-01 21:53:58 -07:00
Phillip Webb 82795f9966 Move `DisableReactorResourceFactory...` to spring-boot-test
Move `DisableReactorResourceFactoryGlobalResources...` support from
`spring-boot-web-server-test` back to `spring-boot-test` since it's
useful if Reactor Netty is being used directly and removes the need
for the `spring-boot-web-server-test` dependency.

See gh-46356
See gh-47322
2025-10-01 21:53:35 -07:00
Phillip Webb 7c8a15629b Remove `spring-boot-web-server-test` usage
Remove `spring-boot-web-server-test` usage from the
`spring-boot-webflux-test` module.

See gh-46356
See gh-47322
2025-10-01 21:52:55 -07:00
Phillip Webb ef37765625 Add `BaseUrl` backed HTTP Unit support classes
Add new HTML Unit support classes that use `BaseUrlProviders`
to find the `BaseUrl`.

See gh-46356
2025-10-01 21:51:58 -07:00
Phillip Webb bba56ffc8b Move `RestTestClientBuilderCustomizer` to `spring-boot-test`
Relocate `RestTestClientBuilderCustomizer` to `spring-boot-test`
and break the direct link to web-server by making use of
`spring.factories` and the new `BaseUrlProviders` class.

See gh-46356
2025-10-01 21:51:20 -07:00
Phillip Webb 6f909114e7 Move `WebTestClientBuilderCustomizer` to `spring-boot-test`
Relocate `WebTestClientBuilderCustomizer` to `spring-boot-test`
and break the direct link to web-server and http-codec by making
use of `spring.factories` and the new `BaseUrlProviders` class.

A new `spring-boot-test-integration-test` module has also been
added to ensure hold the previous tests.

See gh-46356
2025-10-01 21:50:13 -07:00
Phillip Webb 79091f926d Introduce `BaseUrl` and `BaseUrlProvider`
Add the concept of a `BaseUrl` to the core `spring-boot-test`
module for use when making test HTTP calls. The web server module
provides `BaseUrlProvider` implementations that provide the actual
base URL (usually `https://localhost:<local-server-port>`).

Test utilities will be able to use `BaseUrlProviders` to find the
`BaseUrl`.

See gh-46356
2025-10-01 21:46:28 -07:00
Phillip Webb 155e3bd5e6 Relocate `@AutoConfigureDataSourceInitialization`
Relocate `@AutoConfigureDataSourceInitialization` from
`spring-jdbc-test` to `spring-boot-test-autoconfigure`. This change
allows Flyway and Liquibase to respond to the annotation without
the user needing to remember the `spring-jdbc-test` dependency.

This is especially important for R2DB applications which may
still be using Flyway or Liquibase for migrations and will
want them to apply during tests.

See gh-46356
See gh-47322
2025-10-01 21:43:13 -07:00
Phillip Webb 8008076e04 Remove spring-boot-json-test module
Remove spring-boot-json-test module and spread code between
`spring-boot-test`, `spring-boot-test-autoconfigure` and JSON
technology modules.

See gh-46356
See gh-47322
2025-10-01 21:42:18 -07:00
Phillip Webb 4b2d358384 Refine spring-boot-test-autoconfigure dependencies
Make `spring-boot-test-autoconfigure` optionally depend on
`spring-boot-autoconfigure` so that it can be an `api` dependency
for `*-test` modules. Also relocate it to core.

See gh-47322
2025-10-01 21:41:55 -07:00
Phillip Webb 17e655b7e5 Relocate `@PropertyMapping` to spring-boot-test
Move `@PropertyMapping` and supporting code from the
`spring-boot-test-autoconfigure` module to `spring-boot-test`
since it's generally applicable.

See gh-46356
See gh-47322
2025-10-01 21:41:03 -07:00
Phillip Webb 2b3a8ff647 Relocate `@TypeExcludeFilters` to spring-boot-test
Move `@TypeExcludeFilters` and supporting code from the
`spring-boot-test-autoconfigure` module to `spring-boot-test`
since it's generally applicable.

See gh-46356
See gh-47322
2025-10-01 21:39:34 -07:00
Phillip Webb 36732bd74a Polish 2025-10-01 17:21:00 -07:00
Phillip Webb 352925bbe8 Polish @Since tags 2025-10-01 17:10:30 -07:00
Phillip Webb 08a641c1a2 Polish whitespace in gradle files 2025-10-01 11:40:03 -07:00
Andy Wilkinson 26364c27e2 Rename …DataAutoConfiguration to Data…AutoConfiguration
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:24], 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:24], 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
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true 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:true version:25], 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-47049
2025-10-01 17:39:08 +01:00
Stéphane Nicoll 787840735b Add support for RestTestClient
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:24], 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:24], 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
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true 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:true version:25], 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 adds support for RestTestClient for MockMvc and integration
tests.

Closes gh-47335
2025-10-01 09:04:59 +02:00
Andy Wilkinson 7a595f1b83 Rename properties for Spring Session Data MongoDB and Data Redis
Closes gh-47333
2025-09-30 15:46:46 +01:00
Stéphane Nicoll 4f6bbac13e Add support for in-memory Batch infrastructure
This commit moves the existing JDBC-based Spring Batch infrastructure
to a new 'spring-boot-batch-jdbc' module, while the existing module
only offers in-memory (aka resourceless) support.

The commit also updates the reference guide to provide some more
information about what's available and how to use it.

Closes gh-46307
2025-09-29 15:00:52 +02:00
Stéphane Nicoll 8c5a25ee5c Merge branch '3.5.x'
Closes gh-47347
2025-09-29 10:23:29 +02:00
Andy Wilkinson 990644919a Make all TypeExcludeFilters package-private
Closes gh-47227
2025-09-26 11:08:53 +01:00
Andy Wilkinson 0959271061 Move jackson read and write to spring.jackson.json
The spring.jackson.read and spring.jackson.write properties are
JSON-specific. To make this more clear, this commit moves them
beneath spring.jackson.json. This also paves the way for
spring.jackson.cbor and spring.jackson.xml properties for CBOR- and
XML-specific settings should we add auto-configuration for XMLMapper
and/or CBORMapper in the future.

Closes gh-47328
2025-09-26 10:01:59 +01:00
Andy Wilkinson 8c7e0c675f Move Jackson datetime property beneath datatype
Closes gh-47327
2025-09-26 09:04:06 +01:00
Andy Wilkinson 0b601118bd Modularize spring-boot-test
Closes gh-46356
2025-09-25 17:24:12 +01: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
Brian Clozel 1cd14c96a5 Configure ProblemDetailJacksonMixin on JsonMapper
Prior to this commit, Spring Boot would use Framework's
`Jackson2ObjectMapperBuilder` to configure the `ObjectMapper` instance.
This builder would configure the `ProblemDetail` mixin automatically.

With the introduction of Jackson 3.x support, Spring Framework removed
its builder in favor of the native Jackson builder. As a result, the
mixin is not registered with the `JsonMapper` aymore.

This commit ensures that the mixin is registered if the `ProblemDetail`
class is present in the classpath.

Closes gh-47298
2025-09-24 14:29:09 +02:00
Andy Wilkinson 51b606e941 Polish 2025-09-24 12:47:09 +01:00
Phillip Webb dc341edfdd Add config prop to enabled/disable Elasticsearch sniffer
Closes gh-47301

Co-Authored-By: Andy Wilkinson <andy.wilkinson@broadcom.com>
2025-09-23 08:28:51 +01:00
Stéphane Nicoll 14703cbafd Revert "Remove mentions of JUnit 4"
This reverts commit 3b98af30f5.

See gh-47228
2025-09-19 17:05:00 +02:00
Stéphane Nicoll 3b98af30f5 Remove mentions of JUnit 4
This commit removes all mentions of JUnit 4 from the Javadoc and
reference documentation. It also harmonizes to simply refers to JUnit.

Closes gh-47228
2025-09-19 15:29:11 +02:00
Phillip Webb c1d51f8687 Remove Bitnami support
Closes gh-47267
2025-09-18 14:41:16 -07:00
Phillip Webb 255ea92a57 Add `HttpClientTransport` factory support
Update `JettyClientHttpRequestFactoryBuilder` and
`JettyClientHttpConnectorBuilder` with support for create the
`HttpClientTransport` from a factory function.

Closes gh-47251
2025-09-18 14:02:18 -07:00
Phillip Webb 2cf854c5b6 Polish 2025-09-18 13:29:47 -07:00
Stéphane Nicoll 2e76cda4ba Upgrade to Flyway 11.13.1
Closes gh-47261
2025-09-18 03:36:34 +02:00
Phillip Webb fc68b001d8 Remove `isImmutable` and `getPrefix` from `OriginLookup`
Drop `isImmutable` and `getPrefix` from `OriginLookup` since
they're not really Origin concerns. Now that `env` is a
foundational layer we can add a dedicated `PropertySourceInfo`
interface and add that to the `o.s.b.env` package without
creating a package tangle.

Closes gh-45547
2025-09-17 14:57:33 -07:00
Phillip Webb 1acda68d39 Relocate `AnsiOutputApplicationListener`
Move `AnsiOutputApplicationListener` from `o.s.b.context.config`
to `o.s.b.support` since it's more of a supporting class than a
context concern.

See gh-47232
2025-09-17 14:57:32 -07:00
Phillip Webb 6c84674c33 Relocate `EnvironmentPostProcessor` and implementations out of `env`
Move the `EnvironmentPostProcessor` from `org.springframework.boot.env`
to `org.springframework.boot` so that we can make the `env` package
foundational.

Most `EnvironmentPostProcessor` implementation has also been relocated
to a new `org.springframework.boot.support` package.

See gh-47232
2025-09-17 14:57:10 -07:00
Phillip Webb 4ebf09ad12 Restructure bootstrap classes to a foundational layer
Move bootstrap code from `org.springframework.boot` to
`org.springframework.boot.bootstrap` and make them a foundational
layer.

This move helps reduce `org.springframework.boot.context.config`
dependencies to `org.springframework.boot`.

See gh-47232
2025-09-17 14:57:10 -07:00
Stéphane Nicoll 35bceeead2 Merge branch '3.5.x'
Closes gh-47254
2025-09-17 15:36:10 +02:00
Stéphane Nicoll aebecb3007 Polish contribution
See gh-47229
2025-09-17 15:04:35 +02:00