Spring environment validation -
we're building spring-based application delivered end users distribution package. users responsible configuring whatever needs configured (it's various filesystem locations, folder access permissions, etc). there's idea make app users understand not configured or parts of configuration invalid. our current approach custom applicationcontextinitializer environment validation "manually" , registers few "low level" beans in application context explicitly. if wrong, initializer throws, exception caught somewhere in main() , interpreted (converted plain english) , displayed. while approach works fine, i'm wondering if there best practices minimize hand-written code , use spring whenever possible. here's illustrative example. application requires folder file uploads. means: there should configuration file this file should accessible app this file should have no syntax errors this file should explicitly define specific property (let app...