-
Notifications
You must be signed in to change notification settings - Fork 41.9k
Closed as not planned
Labels
status: ideal-for-contributionAn issue that a contributor can help us withAn issue that a contributor can help us withtype: bugA general bugA general bug
Description
The ResourceBanner uses placeholders with the regular syntax ${variable.name} syntax.
There are only a few variables supported, which is fine; and some of them, such as the application version, is not resolved when starting the project from IDE (as opposed from the jar).
I wanted to use default values, for instance ${application.version:dev}; when I do that, the printed version becomes dev regardless of whether it's defined.
I reproduced the issue in unit tests in ResourceBannerTests, and I think it is due to the way we handle resolvers:
for (PropertyResolver resolver : getPropertyResolvers(environment, sourceClass)) {
banner = resolver.resolvePlaceholders(banner);
}If the first resolver fails to find the value, it outputs the default value and it's final.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
status: ideal-for-contributionAn issue that a contributor can help us withAn issue that a contributor can help us withtype: bugA general bugA general bug