MyResource.java 文件源码

java
阅读 38 收藏 0 点赞 0 评论 0

项目:parsec-libraries 作者:
/**
 * Method handling HTTP GET requests. The returned object will be sent
 * to the client as "text/plain" media type.
 *
 * @return String that will be returned as a text/plain response.
 */
@Path("myresource/{id1}")
@GET
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
public String getIt(
        @Named("namedValue1") @NotNull @Size(min=5,max=10,message="${validatedValue} min {min}") @PathParam("id1") String value1,
        @Named("namedValue2") @NotNull @Size(min=2,max=10) @QueryParam("key1") String value2,
        @NotNull @Min(1) @QueryParam("key2") Integer value3
) {
    return "OK-" + value1 + "-" + value2 + "-" + value3.toString();
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号