Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to Create Response in Controller Class for Success & Internal Server Error

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 13
    Answer it

    I want to code for success and internal server error response message in my controller class. I need format of code.


    Please anyone please help me


    I'm using springs. The message should be like this:


              Create Term Successful :

                    { 
                     "message": {
                "type": "Success",
                 "code": "200",
                 "description": "Created successfully"
                }
                }

                Create Term Unsuccessful :

                 {
                    "message": {
                    "type": "Internal Error",
                    "code": "500",
                    "description": "Create failed"
                    }
                       }

 0 Answer(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: