I needed some configuration file. So I created a config.properties in resources. Is that the best way to do it ? It looks quite heavy. But maybe better than accessing a database.
Properties properties = new Properties();
try
{
File file = ResourceUtils.getFile("classpath:config.properties");
InputStream in = new FileInputStream(file);
properties.load(in);
String maxHolidays = (String) properties.get("maxHolidays");
properties.setProperty("maxHolidays", "20");
}
catch(Exception e)
{
System.out.println("");
}
if I want to set a new value to my property "maxHolidays" is it also possible from code