MessageSourceAware

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 …

About Us

HowToDoInJava provides tutorials and how-to guides on Java and related technologies.

It also shares the best practices, algorithms & solutions and frequently asked interview questions.