在 Java 属性文件中引用其他变量 [英] Reference other variables in Java properties file

查看:46
本文介绍了在 Java 属性文件中引用其他变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能的重复:
如何在 java.util.Properties 中引用另一个属性?

我想在我的属性文件中引用其他变量,例如:

I want to refer to other variables in my properties file, e.g.:

name=World
text=Hello $(name)!

text"现在应该是Hello World!".

"text" should now be "Hello World!".

我知道我可以手工完成,但有什么我可以使用的东西对我有用吗?

I know I could do it by hand but is there anything I could use which does the work for me?

推荐答案

Michael 链接到的问题中提到的选项之一 在他上面的评论中,我觉得可以帮助您的是 eproperties.看起来很有前途.

One of the options mentioned in the question that Michael linked to in his comment above that I feel may help you is eproperties. Looks pretty promising.

HTH!

这篇关于在 Java 属性文件中引用其他变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆