One way is the DI using setter methods. Other way is using constructor.
I am just curious to know which type of DI the following way is :
public class Test {
@Autowired
TestService service;
...
}
One way is the DI using setter methods. Other way is using constructor.
I am just curious to know which type of DI the following way is :
public class Test {
@Autowired
TestService service;
...
}