This post continues from the last one . I will try to complete the lead microservice in this post. I will be focusing primarily on the CRUD operation. In CRM applications, that is the primary set of operations. I will start by creating the exception class. Later I would show how to use this exception class and Spring Rest exception handling and build a robust error handling around the API calls. Listing 1 - BusinessException.java Next step would be to introduce the service class. Since this is CRUD most of the functionality can be encapsulated in an abstract parent service class. Any specific feature like convert lead to opportunity can be implemented in the LeadService class. Listing 2 - AbstractBaseBusinessDelegate.java And then finally the LeadService implementation class is shown in Listing 3. Listing 3 - LeadBusinessDelegate.java Note that this code will not compile. In order to get this to compile, you will need to add 2 new dependencies for the...
"I have no special talent. I am only passionately curious" - Albert Einstein