我正在通過message.properties在我的應用程序中顯示文本,現在在某些情況下我必須顯示類似的消息,並稍作更改。是否有可能在消息屬性只喜歡檢查條件:是否可以在message.properties文件中編寫表達式?
if (a == salary) {
code = your salary for this month is {0}
}else if (a == tax) {
code = your tax for this month is {0}
}
現在,在這種情況下,在文本中唯一區別是工資和稅收,而不是在控制器檢查它,或者我要檢查在message.properties這種情況下只。可能嗎 ?如果是的話如何?
謝謝!提前。
謝謝你回答,但那不是我要求的。其實我不能在例子中解釋我想問的簡單的事情是我們可以檢查message.properties中的條件嗎? –