Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve java loading Sample #112

Open
mathiasmuller4sh opened this issue Dec 7, 2020 · 0 comments
Open

Improve java loading Sample #112

mathiasmuller4sh opened this issue Dec 7, 2020 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@mathiasmuller4sh
Copy link

mathiasmuller4sh commented Dec 7, 2020

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

@Lysoun Lysoun added the documentation Improvements or additions to documentation label Dec 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants