Closed as not planned
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.