Java messageSource没有';t替换模板中的所有参数
我有密码:Java messageSource没有';t替换模板中的所有参数,java,spring,internationalization,template-engine,resourcebundle,Java,Spring,Internationalization,Template Engine,Resourcebundle,我有密码: messageSource.getMessage("some.key",new Object[]{30,31},Constants.LOCALE) 和属性文件内的键: some.key=Csv header length ({0}) doesn't correspond the mapping file size {1} . 但结果很奇怪: Csv header length (30) doesn't correspond the mapping file size {1} .
messageSource.getMessage("some.key",new Object[]{30,31},Constants.LOCALE)
和属性文件内的键:
some.key=Csv header length ({0}) doesn't correspond the mapping file size {1} .
但结果很奇怪:
Csv header length (30) doesn't correspond the mapping file size {1} .
已成功替换第一个变量,但未替换第二个变量
为什么第二个参数没有解决?问题是因为消息中有一个未转义的引号
有关您的问题的示例,请参见。难以置信。我不敢相信我的IDE没有警告我这一点。无论如何,谢谢你的解决方案。