datamaintain icon indicating copy to clipboard operation
datamaintain copied to clipboard

Improve java loading Sample

Open mathiasmuller4sh opened this issue 4 years ago • 0 comments

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);

mathiasmuller4sh avatar Dec 07 '20 16:12 mathiasmuller4sh