I am working on a struts2 project in which guice is used for dependency injection. Now i have a java project in which services are written for 1.0 version and 1.1 version like below.
public interface Services
{
public void meth1();
}
public class ServiceImpl1_0 implements Services
{
public void meth1()
{
}
}
public class ServiceImpl1_1 implements Services
{
public void meth1()
{
}
}
I created two guice modules, one to inject 1_0 version and another to inject 1_1 version.
This project is consumed in main project where i have to inject the dependency based on the version number like
if version 1.0 then install 1_0 guice module else install 1_1 guice module.
Please help me how can i achieve it?