Hello
Use code tags, is more readable for us
Code:
class S;
P extends S;
class C{
private S s;
}
Absolutely not, Spring work with Interfaces since it works with the Proxy Pattern and furthermore interfaces offer a level of loose coupling
Code:
Interface A;
S implements A;
P extends S implements A;
class C{
private A a;
}
I think is fine, but you must consider for this situation use @Service("p") and @Service("s") for each class implementation, therefore when you inject the interface into the controller with @Autowired you must now use and add the @Qualifier("p")
Let me know your advance