I am using SpringBoot to fetch access Token from my client. I could not separate the Access Token from the responseEntity. Is there a way to Fetch the AccessToken data alone? Here is the code: public ResponseEntity generate_Access_token() { } } The response: Answer Make your life easier, not harder – use plain DTO and then