Managing configurations in java (initial config / save/load config)

后端 未结 3 1966
自闭症患者
自闭症患者 2021-01-23 11:41

I got a class Config wich looks like that:

public Class Config {

    public static int someIntValue = 0;
    public static String someText = \"some text\";

}
         


        
3条回答
  •  鱼传尺愫
    2021-01-23 11:54

    I would just use java.util.Properties, or some wrapper around it. Another good approach is java bean and something like xstream to save/load stuff.

提交回复
热议问题