Can you suggest something more advanced than java.util.Properties?

Do you know any libraries similar to java.util.Properties that support more complex functions such as grouping properties, storing arrays, etc.? I am not looking for some kind of heavy super-advanced solution, just something easy and useful for any project.

Thanks.

+4
source share
6 answers

Commons Configuration from the apache group sounds the same as what you are looking for.

+8
source

I used java.util.prefs before, and this seems to be the trick for me. Your mileage may vary.

+3
source

Yaml is a simple step from the basic text configuration, it allows you to create more structure and data types (including the ones you have), as well as for a large number of languages ​​(including Java: Jyaml ), it even has serialization support, so mapping to / from your classes is often very easy.

Yaml is also easier and easier than starting with XML.

+2
source

I am a big fan of the Spring framework for setting up objects and services. It uses the XML format and supports all types of Java collections and links to other objects. It's not hard to get started, but it also has many powerful features that you will never need.

Also, XStream for simple XML serialization is very simple and easy to use.

+2
source

I could consider JSON (JavaScript Object Notation). It is very readable, and Java code for reading and writing JSON formatted data is easily accessible.

+2
source

You can take a look at Apache Collection Collections

+1
source

Source: https://habr.com/ru/post/1277053/


All Articles