PropertyPlaceholderConfigurer vs ReloadableResourceBundleMessageSource

你。 提交于 2019-12-04 09:47:27

PropertyPlaceholderConfigurer used for properties files to be used in the application context or inside the code with with @value.

ResourceBundleMessageSource used for Internationalization & Localization (i18n) of messages you want to show to the user, within jsp direct, or from your code by wiring message resources bean inside your component.

Arun

PropertyPlaceholderConfigurer

We use PropertyPlaceholderConfigurer when we need to load some property files whose properties are used in applicationcontext.xml of spring. We can use the properties directly using JSTL expressions.

ReloadableResourceBundleMessageSource

We use ReloadableResourceBundleMessageSource when we need to use the property files outside the applicationcontext.xml. The properties loaded using ReloadableResourceBundleMessageSource are not accessible in applicationcontext.xml

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!