spring-framework/framework-docs/modules/ROOT
Sam Brannen 1f544f113a Support resource patterns in @TestPropertySource locations
Inspired by the recently added support for resource patterns in
@PropertySource locations, this commit adds the same support for
resource locations in @TestPropertySource.

For example, assuming the `config` folder in the classpath contains
only 3 files matching the pattern `file?.properties`,

... the following:

@TestPropertySource("classpath:/config/file1.properties")
@TestPropertySource("classpath:/config/file2.properties")
@TestPropertySource("classpath:/config/file3.properties")

... or:

@TestPropertySource({
    "classpath:/config/file1.properties",
    "classpath:/config/file2.properties",
    "classpath:/config/file3.properties"
})

... can now be replaced by:

@TestPropertySource("classpath*:/config/file?.properties")

See gh-21325
Closes gh-31055
2023-08-16 12:34:20 +02:00
..
assets/images
examples Use include-code Macro 2023-05-04 15:35:05 +01:00
pages Support resource patterns in @TestPropertySource locations 2023-08-16 12:34:20 +02:00
partials/web Update documentation for data binding improvements 2023-08-02 17:21:33 +03:00
nav.adoc Document method validation improvements 2023-07-05 17:07:30 +01:00