I would like that my Spring-based web application were able to validate its configuration during startup.
This means for example:
- check if the required folders exist and are readable/writable
- check if the required configuration keys are set and consistent
- ...
- check any other constraint that is required for the correct functioning
How can you perform these checks and notify the system administrator if something is wrong?
The goal is to reduce the risk that some critical error arises when the application is actually going to need those resources that are bound to the wrong configuration.
NOTE: my approach is to use a special EnvironmentValidation bean that checks if the configuration/folder structure is ok and if not it throws an exception