THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Sometimes you'll want to define the override as a service of its own: this is useful if you want to inject a Logger specific to the service, or if the overriding implementation needs a service configuration:
Code Block | ||||
---|---|---|---|---|
| ||||
public static void bind(ServiceBinder binder) { binder.bind(SomeServiceType.class, SomeServiceTypeOverrideImpl.class).withId("SomeServiceTypeOverride"); } @Contribute(ServiceOverride.class) public static void setupApplicationServiceOverrides(MappedConfiguration<Class,Object> configuration, @Local SomeServiceType override) { configuration.add(SomeServiceType.class, override); } |
...