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

Register DW Configuration as spring @Configuration bean? #2

Open
lkobashigawa opened this issue Apr 16, 2013 · 1 comment
Open

Register DW Configuration as spring @Configuration bean? #2

lkobashigawa opened this issue Apr 16, 2013 · 1 comment

Comments

@lkobashigawa
Copy link

Do you think there is a way to get the DropWizard Configuration class to be processed by the ConfigurationClassPostProcessor?

Then it would be possible to have @bean methods on the Configuration class itself that would initialize shared resources like the JDBI instance or a DataSource and make them available for autowiring. As it is now, if you wanted to have your JDBC settings in your YAML file, you'd need to have both a Dropwizard configuration class to receive the values, and a separate spring @configuration class to inject with @value and produce the DataSource.

@BernhardBln
Copy link

Nice idea. I helped myself with this, but your solution sounds nicer:

#10

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

No branches or pull requests

2 participants