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

how to pass a parameter to a binder? #7

Open
yingqiaomxi opened this issue Jun 7, 2017 · 0 comments
Open

how to pass a parameter to a binder? #7

yingqiaomxi opened this issue Jun 7, 2017 · 0 comments

Comments

@yingqiaomxi
Copy link

yingqiaomxi commented Jun 7, 2017

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.

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

1 participant