@Path annotation
Zero support two mode for @Path
annotation.
- Annotated on Class and Method both;
- Annotated on Method only;
For the first point please refer Getting Start
1. Source Code
package org.exmaple;
import io.vertx.up.annotations.EndPoint;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.QueryParam;
@EndPoint
public class ZeroNoPathApi {
@GET
@Path("/up/example/non-path")
public String getZero(
@QueryParam("name") final String name) {
return "No Path " + name;
}
}
2. Console
...
[ ZERO ] ( 1 Event ) The endpoint org.exmaple.ZeroNoPathApi scanned 1 events of Event, ...
...
[ ZERO ] ( Uri Register ) "/up/example/non-path" has been deployed by ZeroHttpAgent, ...
...