datamaintain
datamaintain copied to clipboard
Improve java loading Sample
In a real world loading in a war the path set in the sample is wrong wand can be confusing for beginner. Since we can not rely on the runtime path in server we should declare the folder at runtime. Example:
final Properties properties = new Properties(); properties.load(AppModule.class.getResourceAsStream("/datamaintain.properties")); String scripts = AppModule.class.getResource("/scripts/").getFile(); properties.put("scan.path", scripts);