javaspringservicenamingresolver

What is the difference between Resolver and Service in java


I have a general question , i noticed that some people are naming classes as Resolver in spring boot application , but in functionality it os the same as in services , the only difference is the naming. Is there some sort of rules where i sould apply one of this namings , or it doesn`t matter For example if class is only responsible for retrieving data from API, it sould be named as SomeSortApiResolver or SomeSortApiService?


Solution

  • Services are responsible for performing complex operations, interacting with the database or other external services, orchestrating data processing, and managing the application's flow logic. Resolvers can be used to address technical details or specific tasks, such as handling special situation or parameter mapping or performing conversions in a Spring application.