I want to know whether I can use object of service layer marked with @Service
annotation and call one of its method in non mvc-spring class ?
Say there is a method getUsers()
in service layer
which calls getUsers()
of Dao layer. In order to use it in contoller
I have to add the @Autowired
-annotation in the service layer instance. But if I want to use the class method getUsers()
in non-mvc class, how can I do that?