When spring-boot-properties-migrator detects an error (and/or warning) report, it would be nice to have an option to prevent the application from starting up.
I would like to enforce the proper usage of properties in the application (avoiding the use of deprecated or removed properties). Logs are easily buried, and developers often do not pay attention during development.
It would be beneficial to fail fast to detect incorrect usage of properties rather than discovering it the hard way later on.
Comment From: itsAkshayDubey
Hi @philwebb ,
I would like to work on this enhancement, could you please assign me this issue so that I can submit my PR in favour of this issue.
Thanks, Akshay
Comment From: itsAkshayDubey
I've been thinking about a potential solution to this issue. How about we introduce two new externalised properties: spring.tools.properties-migrator.fail-on-warning and spring.tools.properties-migrator.fail-on-error? By default, we could have these set to false. But, if a developer sets them to true, the properties-migrator would log an exception and stop the application if it encounters a warning or error.
One thing to note is that if fail-on-warning is set to true, fail-on-error would automatically be set to true as well. This way, we can ensure that we're catching any issues early on, which will help us maintain the proper usage of properties and avoid any headaches down the line.
Comment From: wilkinsona
Thanks for taking a look, @itsAkshayDubey. I think a single property might be better here. Something like spring.tools.properties-migrator.fail-on with supported values of warning and error.