|
|
|
|
|
by aembleton
2101 days ago
|
|
Annotations make dependency injection simpler. If you have a Controller that has a Service autowired into the constructor then you can test it by passing a mock service into the constructor. An alternative would be to have a Main method construct all of the objects and pass them into each other, but @Autowired takes care of that for you. |
|