I have Maven project which uses another project as jar library. I have @Inject'ed UserService interface from jar and I get:
com.google.inject.ConfigurationException: Guice configuration errors: 1) No implementation for UserService was bound.
I have tried to bind UserService interface to the concrete class but later I get "No implementation for ... was bound" exceptions for classes injected into UserService. How to solve this problem?
public class UserServiceImpl implements UserService
@Override
protected void configure() {
Properties configProperties = loadPropertiesFile("device.properties");
bind(Properties.class).annotatedWith(AppProperties.class).toInstance(configProperties);
Names.bindProperties(binder(), configProperties);
Names.bindProperties(binder(), loadProperties("/" + GenericBootstrapConstants.BOOTSTRAP_PROPERTIES_FILE));
bind(UserService.class).to(UserServiceImpl.class);
}