如何使用freemarker和spring替换回车?<br />

Pet*_*son 10 spring freemarker

我有一个使用spring和freemarker的国际化应用程序.我正在使用本地化属性文件获取内容.

${rc.getMessage("help.headings.frequently_asked_questions")}
Run Code Online (Sandbox Code Playgroud)

对于某些内容,属性值中有回车符.因为我在网页上显示我想用这些替换它们
.

做这个的最好方式是什么?

编辑:看得更近似乎我在属性文件中实际上没有回车.这些属性将作为单行字符串返回.

是否有更好的方法来声明属性,以便他们知道它们是多行的?

help.faq.answer.new_users=If you have not yet set a PIN, please enter your username and passcode (from your token) in the boxes provided and leave the PIN field blank.\
You will be taken through the steps to create a PIN the first time you log in.
Run Code Online (Sandbox Code Playgroud)

干杯,皮特

Jiř*_*řík 13

${springMacroRequestContext.getMessage("help.headings.frequently_asked_questions", [], "", false)?html?replace("\n", "<br>")}