-
Notifications
You must be signed in to change notification settings - Fork 41.4k
Closed
Labels
status: supersededAn issue that has been superseded by anotherAn issue that has been superseded by another
Description
As far as I can tell, Spring Boot 2 accepts syntax errors in the SPRING_APPLICATION_JSON
environment variable and silently ignores the whole content of the environment variable. This leads to problems that are hard to debug, where properties are not overridden when running an application.
Consider the following example.
application.yml
:
parentKey:
childKey: true
SPRING_APPLICATION_JSON
:
{"parentKey" {"childKey": false}}
(Note the missing colon after "parentKey"
.)
If you now try to inject the value via @Value
or a @ConfigurationProperties
class, you get true
instead of false
.
In my opinion it would be better to throw an exception and abort application startup in this case or at least to log an error or warning.
Metadata
Metadata
Assignees
Labels
status: supersededAn issue that has been superseded by anotherAn issue that has been superseded by another