类型可能包括布尔值,日期,时间戳或字符串。
我需要能够提供管理用户更改这些属性的能力,并让系统记住/将它们保存到一个文件。
我正在寻找一种最佳实践方法来存储这些应用程序属性,并能够持久化它们,并在启动时加载它们。
解决方案Java具有特定的功能为此目的 - 属性。 这是非常好的文章。
download-llnw.oracle/javase/tutorial/essential/environment/properties.html
I have a series of application properties which all have different types.
The types could include, booleans, dates, timestamps, or strings.
I need to be able to provide the ability for administrative users to change these properties and have the system to remember / persist them to a file.
I am looking for a best practice way to store these application properties and be able to persist them on change and load them on start up.
解决方案Java has a facility built specifically for this purpose - Properties. Here is very good article about it
download-llnw.oracle/javase/tutorial/essential/environment/properties.html
更多推荐
持久化应用程序属性的好方法是什么?
发布评论