Move config to root

This commit is contained in:
floppydiskette 2024-09-05 03:57:46 +01:00
parent c3272ad9ac
commit 143898753e
Signed by: fwoppydwisk
SSH key fingerprint: SHA256:Hqn452XQ1ETzUt/FthJu6+OFkS4NBxCv5VQSEvuk7CE
2 changed files with 3 additions and 4 deletions

4
.gitignore vendored
View file

@ -39,8 +39,8 @@ build/
.DS_Store
### Other Stuff ###
**/resources/config*.json
!**/resources/config.example.json
config*.json
config.example.json
!**/resources/config.schema.json
### why would this not be here already ###

View file

@ -22,8 +22,7 @@ public class Config {
*/
public static Config readConfig() throws IOException {
Logger log = Logging.getLogger();
try (InputStream in=Thread.currentThread().getContextClassLoader().getResourceAsStream("config.json")) {
assert in != null;
try (InputStream in = new FileInputStream("./config.json")) {
Reader reader = new InputStreamReader(in, StandardCharsets.UTF_8);
log.info("Loaded config");
return new Gson().fromJson(reader, Config.class);