1. 程式人生 > >spring ----> ResourceBundle [message] not found for MessageSource: Can't find bundle for base name message, local_zh

spring ----> ResourceBundle [message] not found for MessageSource: Can't find bundle for base name message, local_zh

blank 文件配置 dea name flow jdk get 資源 spring4

環境:

idea 2018.1.3社區版,jdk8,spring4.2.0,maven3.5.2

主題:

spring國際化

出現的問題:

ResourceBundle [message] not found for MessageSource: Can‘t find bundle for base name message, local_zh

解決:

參考解決方法 https://stackoverflow.com/questions/25121392/resourcebundle-not-found-for-messagesource

使用 org.springframework.context.support.ResourceBundleMessageSource 配置會導致以上問題出現。

改用 org.springframework.context.support.ReloadableResourceBundleMessageSource。

放置資源文件:

技術分享圖片

xml文件配置如下:

技術分享圖片

spring ----> ResourceBundle [message] not found for MessageSource: Can't find bundle for base name message, local_zh