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

Add application configuration that can be used to configure services #55

Merged
merged 2 commits into from
Jun 8, 2018

Conversation

prd-fox
Copy link
Contributor

@prd-fox prd-fox commented Jun 8, 2018

Add an initial version of configuration and its holder classes that can be sent around the application.

namtruong
namtruong previously approved these changes Jun 8, 2018
@prd-fox prd-fox merged commit bf18bcf into master Jun 8, 2018
@prd-fox prd-fox deleted the feature/application-configuration branch June 8, 2018 13:56

public enum ConfigHolder {

INSTANCE;
Copy link
Contributor

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

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor

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.

melowe pushed a commit that referenced this pull request Jun 28, 2018
…figuration

Add application configuration that can be used to configure services
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.

4 participants