ef-labs / vertx-guice

Create Vert.x Modules and Verticles with dependency injection using Guice
MIT License
59 stars 24 forks source link

Make the default BOOTSTRAP_BINDER_NAME configurable #14

Open galves opened 7 years ago

galves commented 7 years ago

It is a bit of a pain having to explicitly define the binder name for each verticle in the json deployment config, when I imagine most users have the same binder for each verticle deployment?

Also it creates a confusing error when the binder is not set:

"Guice bootstrap binder class com.englishtown.vertx.guice.BootstrapBinder was not found. Are you missing injection bindings?"

This should at most result in a warning because you may intentionally be using just a parent injector.

Please can we add a setter for it the binder in the verticle factory then pass it to the loader.

Thanks

dano commented 6 years ago

FWIW, the issue with the confusing error is fixed by https://github.com/ef-labs/vertx-guice/pull/13