Relatively common configuration file format

classification

properties

josn

yaml

hocon

 

Easily support more complex configuration

In addition to the properties and json complex profile, or alternatively YAML HOCON

Yamla:

Application scenarios: a multi-level relationships, array, defined constants (including: integer, floating point, string, NULL, date, boolean, time)

HOCON:

HOCON (Human-Optimized Config Object Notation) is easy to use a configuration file format. It is used independently, and Sponge Sponge widget using the API to store important data, such as configuration data or player. HOCON usually .conf file name as a suffix.

 

Reading support

Typesafe the Config library, written in pure Java, zero external dependencies, streamlined code, functional and flexible, API-friendly. Support Java properties, JSON, JSON superset format HOCON and environment variables. It is also the configuration management database of Akka.

org.yaml.snakeyaml supports reading files yaml

 

Guess you like

Origin www.cnblogs.com/tankaixiong/p/11494252.html