-
Notifications
You must be signed in to change notification settings - Fork 109
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
Add application configuration that can be used to configure services #55
Conversation
|
||
public enum ConfigHolder { | ||
|
||
INSTANCE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we not use longhand here, to make it clearer?
public static final MySingleton INSTANCE = new MySingleton();
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this was done to keep it outside the spring xml file, but then it somehow made its way in anyway. Definitely a refactoring consideration, but for now this works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using enum classes for singletons is pretty uncontroversial.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mark, sure but it's good to keep things simple. I'd never seen this before and I'm sure there are plenty of folks who'd have to do a quick google to work it out.
…figuration Add application configuration that can be used to configure services
Add an initial version of configuration and its holder classes that can be sent around the application.