Jsf 从另一个java项目加载资源包

Jsf 从另一个java项目加载资源包,jsf,resourcebundle,modularity,Jsf,Resourcebundle,Modularity,我想从另一个项目加载i18资源包, 我设法从我的webApp项目的resources目录中加载了18n个messages属性文件,但我真正需要的是让我的所有配置文件驻留在另一个项目中 以下是我的脸配置: <faces-config xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="htt

我想从另一个项目加载i18资源包, 我设法从我的webApp项目的resources目录中加载了18n个messages属性文件,但我真正需要的是让我的所有配置文件驻留在另一个项目中

以下是我的脸配置:

<faces-config
    xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_1.xsd"
    version="2.1">

    <application>
      <resource-bundle>
         <base-name>messages</base-name>
         <var>msgs</var>
      </resource-bundle>
      <locale-config>
         <default-locale>fr</default-locale>
      </locale-config>
    </application>
</faces-config>

消息文件位于my webapp resources目录中。

只需将其他项目的jar添加到项目的类路径中即可。 该jar应该具有属性文件