- Create a request POJO for accepting requests:
import lombok.Data;@Datapublic class IAMOperationRequest { private String operation; private String userName;}
- Create a POJO for sending back the response from the handler:
import lombok.AllArgsConstructor;import lombok.Data;@AllArgsConstructor@Datapublic class IAMOperationResponse { private String message; private String errorMessage;}
For our POJOs, we use project lombok (@Data) to auto-generate getters, setters, and so on. Project lombok dependency is added to the parent project simple-starter-parent-java. If you are using an IDE for development, you will have to install a plugin for your IDE to recognize project lombok annotations.
Creating ...