configuration for reading static.messages properties files in project
Assume that we have Resource Bundle 'message' and Resource Bundle 'validation' folders (there are properties files inside them), under static.messages folder , then we can configure for read this properties from resource folders like that: @Bean public ResourceBundleMessageSource messageSource() { ResourceBundleMessageSource source = new ResourceBundleMessageSource(); source.setBasenames("static/messages/message", "static/messages/validation"); source.setDefaultLocale(new Locale("az")); source.setUseCodeAsDefaultMessage(true); source.setDefaultEncoding("UTF-8"); return source; } @Bean public LocalValidatorFactoryBean getValidator() { LocalValidatorFactoryBean bean = new LocalValidatorFactoryBean(); bean.se...