@Service
public class UserService implements Service{
@Autowired
private Service self;
}
Does the code above works fine in Spring new versions (5.*)? ( I could check by myself but I wanna know 100%, but myself I may screw it up somehow ) Also I know workarounds:
@Service(value = "someService")
public class UserService implements Service{
@Resource(name = "someService")
private Service self;
}
OR
@Autowired
private ApplicationContext applicationContext;
So I'm not just asking for nothing, I need to know 100% I need an advice from professionals, I don't believe to myself experiments, because I'm not so much experienced in Spring ( e.g. there are much nebulous configs there for me) . Hope this clarifies why I'm asking rather than experiment.