I'm very new to spring, so I might ask silly question but anyway...
I have built Spring MVC 4.0 application.
my settings are like this:
Controller >> Service >> DAO
in controller level I use about 4 to 5 different @Autowired variables like this
@Autowired
private ClientService clientService;
@Autowired
private CommentService commentService;
@Autowired
private SearchService searchService;
In Service level I Autowire also several DAOs
@Autowired
SearchDAO searchDAO;
@Autowired
private ActivityDAO activityDAO;
@Autowired
private UserService userService;
I have about 10 different controllers and in majority of them I @Autowire same services, So my question is this ok or not?
Is is ok to use @Autowire as many times as I need or will bring too much memory usage? Will it have some other effects on my application?
I use Spring 4.0 + hibernate JPA