You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Spring's standard property handling, I can define a value in either application.properties or application-dev.properties and Spring will find the value in either place (assuming I'm using the dev profile, and with various override rules).
I see that I can get this fallback, if I set optional to true, but what I really want is to say "this property has to be found eventually." The behavior of non-optional seems to strict right now, since the property must exist in the first location examined.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
In Spring's standard property handling, I can define a value in either
application.properties
orapplication-dev.properties
and Spring will find the value in either place (assuming I'm using thedev
profile, and with various override rules).I see that I can get this fallback, if I set
optional
to true, but what I really want is to say "this property has to be found eventually." The behavior of non-optional seems to strict right now, since the property must exist in the first location examined.Beta Was this translation helpful? Give feedback.
All reactions