Tapestry 3:无法从属性文件中获取消息 [英] Tapestry 3: cannot get messages from properties file
本文介绍了Tapestry 3:无法从属性文件中获取消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在 HelloWorld.html 和 HelloWorld.properties 文件中有 Tapestry 3 模板,在同一个文件夹中有字符串,但无法获取它们.
I have tapestry 3 template in HelloWorld.html and HelloWorld.properties file with strings in the same folder, but cannot get them.
我试过:
我唯一的输出是 [PAGETITLE].
The only output that i have is [PAGETITLE].
这里是属性文件的内容:
Here is the content of properties file:
pageTitle=你好世界
pageTitle=Hello world
推荐答案
.properties 文件需要和对应的类放在同一个文件夹中:可能在 src/main/resources 下(当然它会随着你的布局而变化)项目).
The .properties file needs to go in the same folder as the corresponding class: probably under src/main/resources (it of course varies with the layout of your project).
这篇关于Tapestry 3:无法从属性文件中获取消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文