how to pass a parameter to a binder?
yingqiaomxi opened this issue · comments
yingqiaomxi commented
I am using vertx-jersey with vertx-hk2. I have one problem. Is it possible that I can set up a custom binder with a parameter?
For example, I have a startupbinder as below:
public class StartupBinder extends AbstractBinder{
private JsonObject iEnvConfig;
public StartupBinder(JsonObject aEnvConfig){
iEnvConfig = aEnvConfig;
}
@Override
public void configure(){
bind(iEnvConfig).to(JsonObject.class).named("EnvConfig");
}
}
However, I don't know how to make it be invoked.