Closed pcyuen98 closed 3 years ago
Spring @Service Annotations is a stereotype for the service layer and also a specialization of @Component annotation. Spring Service Annotations can only be used for classes. It is used to indicate a class as a service provider.
The @RestController annotation in Spring MVC is to simplify the creation of RESTful web services which returns the object and the object data is written directly to the http response as json or xml.
The @RestController annotation is a combination of the @Controller and the @ResponseBody annotation which it eliminates the need to annotate every request handling method of the controller class with the @ResponseBody annotation
References:
Research and Development above the subject above
Provide the reference link below.