JAX-RS (Jakarta API for RESTful Web Services) is a widely used framework for building RESTful web services in Java. It…