@Target(value=METHOD) @Retention(value=RUNTIME) public @interface Get
@Get(":id")
Customer get(long id) {
...
}
Path parameters are matched by name - "status" in the example below.
Method parameters that do not match a path parameter default to being a query parameter - "since" is a query parameter in the example below.
@Get("/status/:status")
List<Customer> getByStatus(String status, LocalDate since) {
...
}
@Get("/status/:status/:parentId")
List<Customer> getByStatus(String status, long parentId, LocalDate since) {
...
}
Copyright © 2019. All rights reserved.