将默认语言环境定义为es_ES时,为什么会得到MissingResourceException语言环境en_US?

时间:2018-12-05 19:45:01

标签: jsf-2 resources bundle

我已将默认语言环境消息束定义为es_ES,但是当我使用en_US配置时,会遇到MissingResourceException。

为什么没有获得默认的es_ES资源?

包装

enter image description here

faces-config.xml

<application>
<locale-config>
    <default-locale>es_ES</default-locale>
    <supported-locale>es_ES</supported-locale>
    <supported-locale>ca_ES</supported-locale>
</locale-config>
<message-bundle>es.roscam.i18n.messages</message-bundle>
<resource-bundle>
    <base-name>es.roscam.i18n.messages</base-name>
    <var>msgs</var>
</resource-bundle>

错误描述

Caused by: javax.servlet.ServletException: Can't find bundle for base name es.roscam.i18n.messages, locale en_US
    ... 
Caused by: java.util.MissingResourceException: Can't find bundle for base name es.roscam.i18n.messages, locale en_US

0 个答案:

没有答案