Commit Graph

10 Commits

Author SHA1 Message Date
Phillip Webb
d442bfbeff Polish 2023-04-10 16:22:11 -07:00
Phillip Webb
c4de86c244 Merge branch '2.7.x' into 3.0.x 2023-02-21 23:17:57 -08:00
Phillip Webb
df5898a146 Reformat code following spring-javaformat upgrade 2023-02-21 22:53:27 -08:00
Phillip Webb
f588793445 Update copyright year of changed files 2022-12-22 01:00:42 -08:00
Moritz Halbritter
725337f976 Make fields final
Closes gh-33537
2022-12-16 14:28:44 +01:00
Andy Wilkinson
4fd2e0c916 Polish "Fix typos"
See gh-30773
2022-05-03 14:09:53 +01:00
Andy Wilkinson
f6d24dc1a8 Fix typos
See gh-30773
2022-05-03 14:09:37 +01:00
Phillip Webb
35aeae5a4f Deprecate Bootstrapper
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
2021-03-24 14:10:12 -07:00
Phillip Webb
1cf9fc107e Improve ConfigData processing code
Refactor `ConfigData` processing code to make it less awkward to
follow.

Prior to this commit the `ConfigDataLocationResolver` would take a
String location and return a `ConfigDataLocation` instance. This was
a little confusing since sometimes we would refer to `location` as the
String value, and sometimes it would be the typed instance. We also
had nowhere sensible to put the `optional:` prefix logic and we needed
to pass a `boolean` parameter to a number of methods. The recently
introduced `Orgin` support also didn't have a good home.

To solve this, `ConfigDataLocation` has been renamed to
`ConfigDataResource`. This frees up `ConfigDataLocation` to be used
as a richer `location` type that holds the String value, the `Orgin`
and provides a home for the `optional:` logic.

This commit also cleans up a few other areas of the code, including
renaming `ResourceConfigData...` to `StandardConfigData...`. It also
introduces a new exception hierarchy for `ConfigDataNotFoundExceptions`.

Closes gh-23711
2020-10-15 11:33:57 -07:00
Phillip Webb
1ae1436211 Refactor BootstrapRegistry support
Refactor `BootstrapRegistry` support following initial prototype work
with the Spring Cloud team.

This update splits the `BootstrapRegistry` API into `BootstrapRegistry`,
`BootstrapContext` and  `ConfigurableBootstrapContext` interfaces and
moves it to the same package as `SpringApplication`.

A new `Bootstrapper` interface has been introduced that can be added
to the `SpringApplication` to customize the `BootstrapRegistry` before
it's used.

Closes gh-23326
2020-09-17 00:31:00 -07:00