I have a services X and Y. If I want to invoke Y inside X. Is there a way to do that thru annotations. I don't want to configure a bean for X/Y, as all the other resources are Autowired for X.
Thanks!
I have a services X and Y. If I want to invoke Y inside X. Is there a way to do that thru annotations. I don't want to configure a bean for X/Y, as all the other resources are Autowired for X.
Thanks!
Spring can only inject managed instances:
If you do not like to add @Service to class Y, then you could use this (X will be the same)