2

I want to configure a governator-powered project, with the Archaius Configuration Provider. I am using Governator version 1.10.5.

I had a look on how to configure an ArchaiusConfigurationProvider, which is described here.

My use case is that I create the LifeCycleInjector by passing a DefaultGovernatorConfiguration builder to Governator.createInjector(). I have seen that this call got deprecated, but is there a way I can set the ArchaiusConfigurationProvider onto the passed-in governator configuration? In previous versions of DefaultGovernatorConfiguration there were methods to add a BootStrap module to the configuration(which is described as the second option in the link above), but not in the latest one.

Also looking at the first option described in the link above, they say a provider could be configured by doing the following:

"Annotate the ConfigurationProvider with @AutoBindSingleton (making sure it is in the set of packages passed to the classpath scanner)." In the case of ArchaiusConfigurationProvider, how can I exactly do this? Do I need to write a wrapper around it, and annotated with @AutoBindSingleton?

Also, I noticed some project karyon, which describes here that it "Binds the ArchaiusConfigurationProvider as governator's ConfigurationProvider". Do I really need the karyon dependency and server just for binding the ConfigurationProvider? Which would be the proper way to do this?

Thanks, Cristian

Brent Worden
  • 10,624
  • 7
  • 52
  • 57
cristi.calugaru
  • 571
  • 10
  • 22

0 Answers0