Skip to content

add application properties and a ConfigLoader to load set configurations - #52

Merged
fmazmz merged 4 commits into
mainfrom
feat/50-application-properties
Feb 12, 2026
Merged

add application properties and a ConfigLoader to load set configurations#52
fmazmz merged 4 commits into
mainfrom
feat/50-application-properties

Conversation

@fmazmz

@fmazmz fmazmz commented Feb 11, 2026

Copy link
Copy Markdown
Member
  • application-properties.yml: will hold the application configurations
  • ConfigLoader.java: Reads the yaml file and maps the config values to a singleton instance of ConfigLoader

Current properties that have been set:

  • Server: port & root directory of the static pages
  • Logging: log level

@coderabbitai ignore

closes #50

@fmazmz
fmazmz marked this pull request as ready for review February 11, 2026 21:00

@bamsemats bamsemats left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks good, nicely done! Might want to implement tests for getPort and getRootDirectory as well, but maybe that's for another PR?

@annikaholmqvist94
annikaholmqvist94 self-requested a review February 12, 2026 10:34

@annikaholmqvist94 annikaholmqvist94 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! This looks well-structured and adds useful configurability

Clean ConfigLoader implementation with singleton pattern
-Good error handling with meaningful exceptions
Server now accepts configurable port (much more flexible)
-Smart use of getOrDefault for missing config values
As @bamsemats mentioned, tests for getPort() and getRootDirectory(), would be valuable. Could be a follow-up PR.

Overall: Solid implementation that integrates cleanly with existing code
Approved

@annikaholmqvist94 annikaholmqvist94 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! This looks well-structured and adds useful configurability

Clean ConfigLoader implementation with singleton pattern
-Good error handling with meaningful exceptions
Server now accepts configurable port (much more flexible)
-Smart use of getOrDefault for missing config values
As @bamsemats mentioned, tests for getPort() and getRootDirectory(), would be valuable. Could be a follow-up PR.

Overall: Solid implementation that integrates cleanly with existing code
Approved

HerrKanin
HerrKanin previously approved these changes Feb 12, 2026
@fmazmz
fmazmz dismissed stale reviews from HerrKanin and annikaholmqvist94 via 29610c8 February 12, 2026 13:56
@fmazmz

fmazmz commented Feb 12, 2026

Copy link
Copy Markdown
Member Author

Thanks for the reviews, I figured lets wait with the tests on this class since we will probably update the properties quite a lot going forward, and that means we have to keep updating the tests.
So leaving it for another PR

@fmazmz
fmazmz merged commit 418f1ad into main Feb 12, 2026
2 checks passed
@fmazmz
fmazmz deleted the feat/50-application-properties branch February 12, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement a config file for the application properties

4 participants