I have upgraded current java version from 1.7 to 1.8. since compatible tapestry version is 5.3.8 I have included same in my code. One of the class (Alias Contribution) is deprecated since tapstry 5.3.8 and they suggested to use ServiceOverride instead of it. Any one can me me out with this issue?
Current code with Alias Contribution(deprecated since tapestry 5.3.8):
public static void contributeAlias(
@InjectService("MyService") MyService myService,Configuration<AliasContribution> configuration)
{
configuration.add(AliasContribution.create(MyService.class, myService));
}
Please suggest how can I use Service Override to make my code compatible with jdk 1.8
Thanks in advance.
With
ServiceOverride
it would look like this:More details here: https://tapestry.apache.org/ioc-cookbook-overriding-ioc-services.html