我正在用maven / spring制作一个项目,但是我面临一个恼人的错误,eclipse无法识别我的消息包,如果我尝试在eclipse中启动weblogic(使用oracle weblogic服务器工具),我得到了这个错误消息和部署中止:
Multiple annotations found at this line:
-config.message not found.
-Resource bundle config.message cannot be found on classpath
但是如果我运行maven构建,并在eclipse之外启动weblogic(startWebLogic.cmd)它运行良好。
在template.xhtml中:
<f:loadBundle basename="config.message" var="msg"/>
faces-config.xml中:
<application>
<el-resolver>org.springframework.web.jsf.el.SpringBeanFacesELResolver</el-resolver>
<locale-config>
<default-locale>pt_BR</default-locale>
<supported-locale>en</supported-locale>
</locale-config>
<resource-bundle>
<base-name>config.message</base-name>
<var>msg</var>
</resource-bundle>
</application>
是谁已经遇到过这个问题并解决了?
答案 0 :(得分:1)
我刚刚找到解决方案而且有点可耻......
我删除了xhtml模板中的<f: loadBundle basename =" config.message "var =" msg "/>
,因为它已在faces-config.xml
中声明了,并且&#39; config.message&#39;物理上不存在属性文件与语言代码连接,这导致了eclipse上的错误。