Validate your Spring yml properties files with a unit test in your CI build
Protect yourself! Validate yaml configuration file for syntax errors before deploying your application. Don't wait until you fail a deployment to recognize simple copy/paste errors and typos. Unit Test Code Create JUnit tests that run as part of every build. GitHub Find the source code on GitHub in freemanSoft/ValidateSpringYml . Source Code The following code validates application.yml. You can pass in any file name or the wildcard "*" The previous Unit Test exercises the following utility method. This method can validate all files that match the passed in pattern where "*" means all yml files. Find the source code on GitHub in freemanSoft/ValidateSpringYml . Original Post 2017 Oct 3