@Path("DcsService") public class DcsService { @GET @Path("/flight/{id}") @Produces(MediaType.APPLICATION_JSON) public DcsFlight getDcsById(@PathParam("id") String id){ // @PathParam("name") String name){ return name; } 正常访问地址是:http://localhost:8080/dc/rest/DcsService/flight/sa 我想放两个参数怎么放? 列如@Path("/flight/{id}/{name}") ? 如果能放两个参数,那怎么访问? 列如http://localhost:8080/dc/rest/DcsService/flight?id=xx & name=xx? 我想问的就是,多个参数怎么定义和进行访问,求教大神,本人刚用这东西两天....
jresey restful GET方式 参数定义以及访问 问题!
最新推荐文章于 2024-05-10 10:01:42 发布