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

环境:

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文件配置如下:

猜你喜欢

转载自www.cnblogs.com/mrray1105/p/9068717.html
今日推荐