Commit Graph

110 Commits

Author SHA1 Message Date
Stéphane Nicoll da8eac3483 Update RetryPolicySettings to configure exception policy as well
Closes gh-47264
2025-10-07 14:07:17 +02:00
Stéphane Nicoll 533544d8fc Polish 2025-10-07 10:39:54 +02:00
Moritz Halbritter 1b44bafda1 Add nullability annotations to tests in core/spring-boot-test-autoconfigure
See gh-47263
2025-10-06 12:03:56 +02:00
Moritz Halbritter 418e057afc Add nullability annotations to tests in core/spring-boot
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
See gh-47263
2025-10-02 14:34:34 +02:00
Moritz Halbritter 4c8cabcb3a Upgrade to JUnit Jupiter 6.0.0
Closes gh-47383
2025-10-02 14:20:04 +02:00
Moritz Halbritter 57992512b7 Add nullability annotations to tests in core/spring-boot-autoconfigure
See gh-47263
2025-10-02 12:17:57 +02:00
Moritz Halbritter b566b73be6 Add nullability annotations to tests in core/spring-boot-docker-compose
See gh-47263
2025-10-02 12:17:00 +02:00
Moritz Halbritter 532ea9abc1 Add nullability annotations to tests in core/spring-boot-properties-migrator
See gh-47263
2025-10-02 12:16:24 +02:00
Moritz Halbritter ea05f6df15 Add nullability annotations to tests in core/spring-boot-test
See gh-47263
2025-10-02 12:12:44 +02:00
Moritz Halbritter 23c9b6510b Add nullability annotations to tests in core/spring-boot-testcontainers
See gh-47263
2025-10-02 12:00:16 +02: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 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 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
Stéphane Nicoll eb307b91ec Merge branch '3.5.x'
Closes gh-47359
2025-09-30 07:50:09 +02: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
Andy Wilkinson 51b606e941 Polish 2025-09-24 12:47:09 +01:00
Stéphane Nicoll c4cace3f74 Upgrade to Log4j2 2.25.2
See gh-46334
2025-09-24 12:14:32 +02:00
Stéphane Nicoll b7695200a9 Re-apply the upgrade to Log4j2 2.25.1
See gh-46372
See gh-46334
2025-09-24 12:13:54 +02:00
Phillip Webb 3a9ab15696 Reintroduce previous EnvironmentPostProcessor in deprecated form
Restore previous `EnvironmentPostProcessor` in deprecated form to help
lessen upgrade pain.

Closes gh-47272
2025-09-22 11:25:23 -07: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 2cf854c5b6 Polish 2025-09-18 13:29:47 -07:00
Moritz Halbritter aac1845cac Improve null-safety of core/spring-boot
See gh-46926
2025-09-18 11:35:52 +02:00
Stéphane Nicoll d9fce46848 Fix checkstyle 2025-09-18 03:43:59 +02:00
Phillip Webb 6642bf7beb Deprecate JUnit 4 OutputCaptureRule
Closes gh-47256
2025-09-17 16:40:32 -07: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 c53ea0a08c Relocate DefaultPropertiesPropertySource to `env`
Move `DefaultPropertiesPropertySource` from
`org.springframework.boot` to `org.springframework.boot.env` since
it's not directly tied to `SpringApplication`.

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 ae1e700df9 Polish contribution
See gh-47244
2025-09-17 16:04:22 +02:00
Yanming Zhou 95305691ab Add support for SimpleTaskExecutor#cancel-remaining-tasks-on-close
See https://github.com/spring-projects/spring-framework/issues/35372
See gh-47244

Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
2025-09-17 16:04:03 +02:00
Stéphane Nicoll 2b6a0d533e Remove unused code
Closes gh-47235
2025-09-17 15:37:25 +02:00
Stéphane Nicoll cdd39bafd7 Introduce spring-boot-persistence
This commit adds a spring-boot-persistence module with data technology
independent features. This provides a better home for EntityScan and
PersistenceExceptionTranslationAutoConfiguration.

Closes gh-45328
2025-09-17 14:42:22 +02:00
Moritz Halbritter 7ada32ca77 Make ConfigDataLocation.of non-nullable
Update `ConfigDataLocation.of` to return an empty location rather than
null. Filtering of empty elements now happens in `ConfigDataProperties`
and `ConfigDataEnvironment` which allows us to simplify
`ConfigDataLocationBindHandler`.

Closes gh-47221

Co-authored-by: Phillip Webb <phil.webb@broadcom.com>
2025-09-16 12:06:36 -07:00
Moritz Halbritter 009bd441f6 Improve null-safety of core/spring-boot
See gh-46926
2025-09-16 13:52:14 +02:00
Moritz Halbritter a6b4400de7 Improve null-safety of core/spring-boot-docker-compose
See gh-46926
2025-09-16 13:52:13 +02:00
Moritz Halbritter 8c0018d739 Further improve null-safety of JsonContentAssert
See gh-46926
2025-09-16 13:42:24 +02:00
Moritz Halbritter 3bfcfaa795 Improve null-safety of JsonContentAssert
See gh-46926
2025-09-16 11:55:16 +02:00
Phillip Webb eeac38b70b Make 'org.springframework.boot.ssl` a foundational package
Closes gh-47219
2025-09-15 20:44:30 -07:00