Spring MessageSourceAware Example
If you want to access i18n resources bundles for different locales in your Spring application, then that a class must implement MessageSourceAware interface. After implementing MessageSourceAware interface, spring context will automatically inject the MessageSource bean’s reference into the class via ‘setMessageSource(MessageSource messageSource)‘ setter method which your class needs to implement. In simple words, MessageSourceAware interface …