Skip to content

Improve origin of imported config #23018

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
philwebb opened this issue Aug 19, 2020 · 0 comments
Closed

Improve origin of imported config #23018

philwebb opened this issue Aug 19, 2020 · 0 comments
Assignees
Labels
theme: config-data Issues related to the configuration theme type: enhancement A general enhancement
Milestone

Comments

@philwebb
Copy link
Member

philwebb commented Aug 19, 2020

The origin of a spring.config.import location isn't very clear at the moment. It would be nice if we could show a full chain of where it came from.

@philwebb philwebb added this to the 2.4.x milestone Aug 19, 2020
@philwebb philwebb added the type: enhancement A general enhancement label Aug 20, 2020
@wilkinsona wilkinsona changed the title Improve orgin of imported config Improve origin of imported config Aug 24, 2020
@philwebb philwebb added the theme: config-data Issues related to the configuration theme label Aug 26, 2020
@philwebb philwebb self-assigned this Aug 27, 2020
@philwebb philwebb modified the milestones: 2.4.x, 2.4.0-M3 Aug 28, 2020
philwebb added a commit that referenced this issue Aug 28, 2020
Update the `Origin` interface to include a default `getParent()` method
which can be used to get the parent origin. The `TextResourceOrigin`
has been updated to implement the method against the source `Resource`.
A new `OriginTrackedResource` implementation allows any `Resource` to
be decorated and carry an optional `Origin`.

Ultimately this will allow us to include parent `Origin` information
on properties loaded via a `PropertySourceLoader` without needing any
changes to that interface.

See gh-23018
philwebb added a commit that referenced this issue Aug 28, 2020
Allow `ConfigDataLocationResolvers` to access `Origin` information for
locations so that they can be used as a parent origin of loaded items.

The `ResourceConfigData...` classes have been reworked so that loaded
`PropertySources` include the parent origin.

See gh-23018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme: config-data Issues related to the configuration theme type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant