Previously, users of the components.index could not use the index in
scenario where Spring Boot needs to locate the SpringBootConfiguration
to use to bootstrap the test context, as AnnotatedClassFinder scans
the classpath for that stereotype specifically and that requires a
dedicated entry for it.
This commit makes sure that a SpringBootConfiguration-annotated type has
a dedicated entry in the components index.
Closes gh-26308
This commit changes the Maven build-image goal to honor the `layout` and
`layoutFactory` parameters to ensure that the archive content sent to the
builder is the same as is used by the `repackage` goal to build the
archive file.
Fixes gh-26216
Previously, the targetJavaVersion property of bootBuildImage was set
using the project's target compatibility directly. This meant that
property's value would reflect the configured target compatibility at
the time of the task's creation and any subsequent changes to the
target compatibility would be missed.
This commit updates the registration of the bootBuildImage task to set
the value of the targetJavaVersion property using a provider. This
indirection means that the project's target compatibility isn't read
until the value of the targetJavaVersion is read, allowing any changes
to the target compatibility to be picked up even if they're made after
the bootBuildImage task has been created.
Fixes gh-26297
This commit disables a test that does not test what it is supposed to
and improve the Metadata assertions to fail early if more than one
matching item by name and type is found in the metadata.
See gh-26271
Prior to this commit, the `spring.web.resources.cache.use-last-modified`
configuration property support was lost during a merge operation right
before 2.4.2.
This is due to an invalid test that missed this unintended change. This
commit fixes both problems.
Fixes gh-26212
This commit updates TaskSchedulingAutoConfiguration to contribute a
LazyInitializationExcludeFilter that processes beans that have
@Scheduled methods. This lets them be contributed to the context so
that scheduled methods are invoked as expected.
Closes gh-25315
Add a `StandardConfigDataResource.getProfile()` method so that it's
possible to tell the profile used when reading a profile specific
resource.
Fixes gh-25940
Update `MavenPublishingConventions` to add a new `mavenOptional` feature
that allows us to declare optional dependencies that are also published
in the generated POM.
This change allows us to include the maven-shade-plugin in the
spring-boot-maven-plugin POM which fixes an issue with Eclipse m2e.
Fixes gh-21992
This commit removes `org.springframework.data.annotation.Persistent`
from the annotation types used for MongoDB entity scanning to align
with Spring Data MongoDB.
Fixes gh-25797
This commit harmonizes our auto-configuration so that default converters
are configured the same way ElasticsearchConfigurationSupport does.
Closes gh-25087
Previously, several tests in FileSystemWatcherTests assumed that all
of the changes detected by the watcher would be grouped into a single
change set. This assumption breaks down when a test runs slowly (due
to CPU or IO contention, for example), and making changes to the file
system takes long then the watcher's polling interval. When this
happens, the changes will be split across two (or more).
This commit attempts to make the tests more robust. The tests now
tolerate multiple changes sets by combining them and asserting that
across the n change sets, only the expected changes were detected.
Closes gh-25901
This commit copies the file mode along with other attributes when
copying files from the source archive to the build container while
building an image using the Gradle plugin. This preserves file
permissions on any resources included in the source archive.
Fixes gh-25915
Prior to this commit, the SslServerCustomizer would use a Reactor Netty
API that lets users customize the SSL configuration, but later override
some of the choices with defaults.
This commits moves from the new deprecated Reactor Netty API and instead
uses a new variant that builds the defaults and lets developers override
them if they want to.
Fixes gh-25913
Update the `ConfigData` import support to allow individual property
sources to be imported with a higher precedence than profile specific
imports.
Prior to this commit, imported sources would always have a higher
precedence than the file that imported them, but a lower precedence
than any profile-specific variant of the same file.
For example, given an `application.properties` that imports `myconfig`,
the contributor tree would be as follows:
ROOT
+- `application.properties`
| +- myconfig
+- `application-<profile>.properties`
The precedence would be:
1) `application-<profile>.properties`
2) myconfig
3) `application.properties`
This works well for most situations, but can be confusing if import is
for a profile-specific property source. For example:
ROOT
+- `application.properties`
| +- myconfig
| +- myconfig-<profile>
+- `application-<profile>.properties`
Results in the order precedence of:
1) `application-<profile>.properties`
2) myconfig-<profile>
3) myconfig
4) `application.properties`
This means that whilst `myconfig` overrides `application.properties`,
`myconfig-profile` does not override `application-<profile>.properties`.
For this specific situation, the preferable order would be:
1) myconfig-<profile>
2) `application-<profile>.properties`
3) myconfig
4) `application.properties`
To support this alternative ordering a new `PROFILE_SPECIFIC` config
data option has been added. Additionally, options may now be specified
on a per-source basis by using the `PropertySourceOptions` interface.
Fixes gh-25766
Previously, would log an error for any exception and also stop
publishing for an UnknownHostException. By constrast, Micrometer's
PushMeterRegistry treats all exceptions the same, logging a warning
and continuing with subsequent push attempts.
This commit updates the push gateway manager's behaviour to match
PushMeterRegistry. UknownHostExceptions no longer receive special
treatment and push (and delete) failures are now logged as warnings
rather than errors.
Fixes gh-25804
This commit modifies the integration tests for the Maven and Gradle
image building goal and task to use a custom builder as a test harness
to verify that the plugins invoke the builder as expected.
Fixes gh-25838
Previously, the configuration metadata annotation processor only
declared support for `@Endpoint` and none of the other more
specialized `@…Endpoint` annotations that are meta-annotated with
`@Endpoint` such as `@WebEndpoint` and `@JmxEndpoint. This would
result in missing metadata if a full or incremental build only
compiled classes annotated with one of the more specialized
`@…Endpoint` annotations as the annotation processor would not be
called.
This commit updates the processor's supported annotation types to
include every known `@…Endpoint` annotation. The test processor has
also been similarly updated to align its behaviour with that of the
main processor.
Fixes gh-25388
Deprecate the `Bootstrapper` interface entirely and provide a
`BootstrapRegistryInitializer` alternative so that people can migrate.
Unfortunately our previous attempt to fix the typo in the `Bootstrapper`
interface didn't provide us a way to remove the deprecated method
without impacting users. It was also problematic for people who were
implementing `Bootstrapper` rather than using a lambda since they needed
to introduce the deprecated method.
We unfortunately can't see a way to fix the original typo without
introducing a new interface.
Fixes gh-25735
Update the default reactive exception handler so that `MediaType.ALL`
is removed regardless of any quality setting. Prior to this commit,
the "match-all" media type was not properly ignored if it has a quality
value and would show HTML content if the accept header was
`application/json, */*;q=0.9`.
See gh-25778
Update `AbstractWebMvcEndpointHandlerMapping` to chain any caught
InvalidEndpointRequestExceptions so that a more complete stacktrace
is available. The exception has also been updated to a
`ResponseStatusException` so that the reason can be propagated.
Fixes gh-25642