Skip to content
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

Allow AbstractEnvironment to bypass active/default properties #26461

Closed
philwebb opened this issue Jan 27, 2021 · 1 comment
Closed

Allow AbstractEnvironment to bypass active/default properties #26461

philwebb opened this issue Jan 27, 2021 · 1 comment
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Milestone

Comments

@philwebb
Copy link
Member

See spring-projects/spring-boot#24890 (comment) for more background.

Currently AbstractEnvironment has doGetActiveProfiles() and doGetDefaultProfiles() methods that will call getProperty() if there aren't any set values. In Spring Boot we call setActiveProfiles(..) and setDefaultProfiles(...) directly and we don't want property based resolution (even if the values set are an empty array).

We'd like a way to disable property based resolution.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jan 27, 2021
@philwebb
Copy link
Member Author

I pushed a suggested implementation here

philwebb added a commit to philwebb/spring-framework that referenced this issue Jan 28, 2021
Introduce protected methods that can be used to bypass or change the
way that active and default property values are read.

Closes spring-projectsgh-26461
@jhoeller jhoeller self-assigned this Jan 28, 2021
@jhoeller jhoeller added in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Jan 28, 2021
@jhoeller jhoeller added this to the 5.3.4 milestone Jan 28, 2021
@snicoll snicoll self-assigned this Feb 15, 2021
snicoll pushed a commit that referenced this issue Feb 15, 2021
Introduce protected methods that can be used to bypass or change the
way that active and default property values are read.

See gh-26461
lxbzmy pushed a commit to lxbzmy/spring-framework that referenced this issue Mar 26, 2022
Introduce protected methods that can be used to bypass or change the
way that active and default property values are read.

See spring-projectsgh-26461
lxbzmy pushed a commit to lxbzmy/spring-framework that referenced this issue Mar 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

4 participants