【发布时间】:2017-03-17 12:40:22
【问题描述】:
我正在使用 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) 效果很好。
在模板.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>
有人遇到过这个问题并解决了吗?
【问题讨论】:
-
如果消息包放在
src/main/resources/下。是否存在于项目的Java源码文件夹中? -
属性是这样放置的:i.imgur.com/42wRuik.png
标签: java spring eclipse maven weblogic