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

相关帖子:
一个小发现:
导致使用配置 org.springframework.context.support.ResourceBundleMessageSource 国际化失败貌似是因为jsp不认识spring的spring标签库:spring.tld标签库,而对于spring-form.tld标签库是认识的。
当使用spring-form.tld标签库时,国际化文件可以放置在类根路径下,而且可以使用org.springframework.context.support.ResourceBundleMessageSource
配置国际化


备注:
有时间用thymeleaf或者FreeMarker试试
spring ----> ResourceBundle [message] not found for MessageSource: Can't find bundle for base name message, local_zh的更多相关文章
- Spring Cloud Gateway过滤器精确控制异常返回(实战,控制http返回码和message字段)
欢迎访问我的GitHub 这里分类和汇总了欣宸的全部原创(含配套源码):https://github.com/zq2599/blog_demos 本篇概览 前文<Spring Cloud Gat ...
- Android Bundle、Handler和Message类介绍
Bundle是一个载体,可以存放基本数据类型.对象等内容,相当于一辆汽车,可以装载很多东西,然后运到需要的地方,例如: Bundle mBundle=new Bundle(); mBundle.put ...
- [spring源码学习]八、IOC源码-messageSource
一.代码实例 我们在第八章可以看到,spring的context在初始化的时候,会默认调用系统中的各种约定好的bean,其中第一个bean就是id为messageSource的bean,我们了解这应该 ...
- Spring boot国际化
国际化主要是引入了MessageSource,我们简单看下如何使用,以及其原理. 1.1 设置资源文件 在 properties新建i18n目录 新建message文件: messages.prope ...
- Maven ResourceBundle.getBundle读取Properties异常MissingResourceException: Can't find bundlei解决方法
参考:https://blog.csdn.net/thousa_ho/article/details/72817616 问题描述 ResourceBundle读取properties配置文件提示 Mi ...
- JSTL解析——007——fmt标签库02
各位亲们,近期事情比较多,没更新,come on! 1.<fmt:bundle>/<fmt:message>/<fmt:param>资源国际化标签 java中使用R ...
- java学习笔记12--国际化
java学习笔记12--国际化 国际化的操作就是指一个程序可以同时适应多门语言,即:如果现在程序者是中国人,则会以中文为显示文字,如果现在程序的使用者是英国人,则会以英语为显示的文字,也就是说可以通过 ...
- spring中MessageSource的配置使用方法3--ResourceBundleMessageSource【转】
本文转载仅供自己学习收录,不做任何商业用途,如有需要请访问原地址:http://blog.csdn.net/qyf_5445/article/details/8124431 ApplicationCo ...
- spring boot 国际化MessageSource
转自:https://blog.csdn.net/flowingflying/article/details/76358970 spring中ResourceBundleMessageSource的配 ...
随机推荐
- C++进程间通信之剪贴板
转载:http://blog.csdn.net/hk627989388/article/details/53693636 转载:http://blog.csdn.net/heihei36/articl ...
- Python3 tkinter基础 Label justify 多行字符串左对齐
Python : 3.7.0 OS : Ubuntu 18.04.1 LTS IDE : PyCharm 2018.2.4 Conda ...
- openwrt中在软件包中定义PKG_INSTALL将会发生什么?
答: 将会使用默认软件包安装方式,相关代码如下 . 在include/package.mk中: Build/Install=$(if $(PKG_INSTALL),$(call Build/Insta ...
- git如何跨分支查找某个commit所属分支?
答: git branch -a --contains <commit id>
- thinkphp留言板开发笔记 1 - 新的
关于php数组的排序函数的总结: 有很多种排序方式和排序规则: 正常排序和反向排序, 使用 -r来表示 排序时是否考虑索引/下标, 如果考虑则加上-a, a=associate. sort是按值来排序 ...
- Vistual Studio Code配置
目录 查看版本,帮助: 修改vscode的扩展目录: 用户和工作区设置 用户设置的文件保存在如下目录: 所以有三种方式更改默认的设置: vscode同步配置: vscode启动launch.json配 ...
- 【Finchley】【升级变更】Spring Cloud 升级到Finchley版本后需要注意的地方
Spring Boot 2.x 已经发布了很久,现在 Spring Cloud 也发布了 基于 Spring Boot 2.x 的 Finchley 版本,现在一起为项目做一次整体框架升级. 升级前 ...
- ThreadLocal 的机制与内存泄漏
ThreadLocal笔记 如上图所示 每个Thread 都有一个map,里面存着Entry<Key,value>,而key是实现了WeakReference的ThreadLocal,如果 ...
- FastQC结果详解
REF https://www.plob.org/article/5987.html 解压后,查看html格式的结果报告.结果分为如下几项: 结果分为绿色的"PASS",黄色的&q ...
- (转) K-Means聚类的Python实践
本文转自: http://python.jobbole.com/87343/ K-Means聚类的Python实践 2017/02/11 · 实践项目 · K-means, 机器学习 分享到:1 原文 ...