I have to model class objects and I have to call my rest service from BookClass as below. Currently I am Autowiring the BookService into my BookClass and getting the response. But some of my seniors are suggesting that BookService should be named as BookHelper. Please advise the difference between this service and helper classes in the below scenario and correct if I am going in wrong direction.
public class BookClass{
@Autowire
BookService service;
public void callingMethod(){
service.createBooks();
}
}
public class BookService(){
public Response createBooks(){
Response response = restclient.createBooks();
}
}
Aucun commentaire:
Enregistrer un commentaire