-
-
Notifications
You must be signed in to change notification settings - Fork 5
Service path
Ahmad K. Bawaneh edited this page Dec 28, 2019
·
2 revisions
the @Path
annotation provides the ability to define a shared path for all service method.
Sample
instead of
@RequestFactory
public interface MoviesService {
@Path("library/movies/:movieName")
@GET
Movie getMovieByName(String movieName);
@Path("library/movies")
@GET
List<Movie> listMovies();
@Path("library/movies/:name")
@PUT
void updateMovie(@RequestBody Movie movie);
}
we can define it like this
@RequestFactory
@Path("library")
public interface MoviesService {
@Path("/movies/:movieName")
@GET
Movie getMovieByName(String movieName);
@Path("/movies")
@GET
List<Movie> listMovies();
@Path("/movies/:name")
@PUT
void updateMovie(@RequestBody Movie movie);
}
- Home
- Quick start
- Sharing clients
-
Configuration
- Locating resource classes
- Service root
- Resource root
- Http methods
- Service method path mapping
- Service path
- Query parameters
- Path parameters
- Header parameters
- Date format
- Request body
- Request and Response mapping
- Produces and Consumes
- Success codes
- Timeout and maximum retries
- With credentials
- Custom request URL
- Global interceptors
- Default failed response handler
- Interface inheritance
- Multipart form data