I have below structure
ProjectA
Public Interface A{
Void do something();
}
Now in another class
Class Example{
@Autowired
A objectA;
public void doinSomething(){
objectA.doSomething();//Line of error
}
}
Now this whole project is packaged in Jar and is injected in another project ProjecB.
ProjectB has Code like this:
Class AImpl implemnets A
{
public void doSomething()
{
// Logic of Interface A from ProjectA
}
}
Class Main{
public void doSomethingOfA{
Example example = new Example();
example.doingSomething()
}
}
When i run the code i gett NPE at Line of error as object of AImpl is not injected . Please suggest me how to achieve this reverse hook using spring.