本文整理了Java中org.apache.juneau.http.annotation.Query.<init>
方法的一些代码示例,展示了Query.<init>
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.<init>
方法的具体详情如下:
包路径:org.apache.juneau.http.annotation.Query
类名称:Query
方法名:<init>
暂无
代码示例来源:origin: org.apache.juneau/juneau-examples-rest
@RemoteMethod(method=GET, path="/pet/findByTags")
@Deprecated
public Collection<Pet> findPetsByTags(
@Query(
name="tags",
description="Tags to filter by",
required=true,
example="['tag1','tag2']"
)
String[] tags
) throws InvalidTag, NotAcceptable;
代码示例来源:origin: apache/juneau
@Query("Q")
public static class SB03 extends LinkedList<String> {
private static final long serialVersionUID = 1L;
}
@RestMethod
代码示例来源:origin: apache/juneau
@RemoteMethod(method=GET, path="/pet/findByTags")
@Deprecated
public Collection<Pet> findPetsByTags(
@Query(
name="tags",
description="Tags to filter by",
required=true,
example="['tag1','tag2']"
)
String[] tags
) throws InvalidTag, NotAcceptable;
代码示例来源:origin: apache/juneau
@RestMethod(name=GET, path="/queryIfNEnameValuePairs")
public String queryIfNEnameValuePairs(
@Query("a") String a,
@Query("b") String b,
@Query("c") String c
) throws Exception {
assertEquals("foo", a);
assertEquals(null, b);
assertEquals(null, c);
return "OK";
}
代码示例来源:origin: apache/juneau
@RestMethod(name=POST, path="/reqBeanQueryIfNE")
public String reqBeanQueryIfNE(
@Query("a") String a,
@Query("b") String b,
@Query("c") String c
) throws Exception {
assertEquals("foo", a);
assertNull(b);
assertNull(c);
return "OK";
}
代码示例来源:origin: apache/juneau
@RestMethod(name=GET, path="/nameValuePairsQuery")
public String nameValuePairsQuery(
@Query("a") String a,
@Query(name="b",allowEmptyValue=true) String b,
@Query("c") String c
) throws Exception {
assertEquals("foo", a);
assertEquals("", b);
assertEquals(null, c);
return "OK";
}
代码示例来源:origin: apache/juneau
@RestMethod(name=GET, path="/mapQuery")
public String mapQuery(
@Query("a") int a,
@Query("b") String b
) throws Exception {
assertEquals(1, a);
assertEquals("foo", b);
return "OK";
}
代码示例来源:origin: apache/juneau
@RestMethod(name=GET, path="/stringQuery1")
public String stringQuery1(
@Query("a") int a,
@Query("b") String b
) throws Exception {
assertEquals(1, a);
assertEquals("foo", b);
return "OK";
}
代码示例来源:origin: apache/juneau
@RestMethod(name=GET, path="/stringQuery2")
public String stringQuery2(
@Query("a") int a,
@Query("b") String b
) throws Exception {
assertEquals(1, a);
assertEquals("foo", b);
return "OK";
}
代码示例来源:origin: apache/juneau
@RestMethod(name=GET, path="/queryIfNE1")
public String queryIfNE1(
@Query("a") String a
) throws Exception {
assertEquals("foo", a);
return "OK";
}
代码示例来源:origin: apache/juneau
@RestMethod(name=GET,path="/path/{foo}/query")
public Foo doFoo(@Query("foo") Foo foo) {
return null;
}
}
代码示例来源:origin: apache/juneau
@RestMethod(name=GET,path="/path/{foo}/query")
public Foo doFoo(@Query("foo") Foo foo) {
return null;
}
}
代码示例来源:origin: apache/juneau
@RestMethod
public ObjectMap d02(@Query("f1") String f1, @Query("f2") String f2, @Query("f3") String f3) {
return new ObjectMap()
.append("f1", f1)
.append("f2", f2)
.append("f3", f3);
}
@RestMethod
代码示例来源:origin: apache/juneau
@RestMethod
public Object c05(@Query(value="x",collectionFormat="multi",items=@Items(format="uon")) C01[] x) {
return x;
}
@RestMethod
代码示例来源:origin: apache/juneau
@RestMethod(name=PUT, path="/setParameterToInvalidTypes/{a1}")
public String b07(@Query("p1") int t1, @Path("a1") int a1, @Header("h1") int h1) {
return "OK";
}
}
代码示例来源:origin: apache/juneau
@RestMethod
public String post(RestRequest req, @Query(name="p1",allowEmptyValue=true) String p1, @Query(name="p2",allowEmptyValue=true) int p2) throws Exception {
RequestQuery q = req.getQuery();
return "p1=["+p1+","+req.getQuery().getString("p1")+","+q.get("p1", String.class)+"],p2=["+p2+","+q.getString("p2")+","+q.get("p2", int.class)+"]";
}
}
代码示例来源:origin: apache/juneau
@RestMethod(name=GET,path="/get2")
public String get2(RestRequest req, @Query(name="p1",format="uon") String p1) throws Exception {
RequestQuery q = req.getQuery();
return "p1=["+p1+","+req.getQuery().getString("p1")+","+q.get("p1", String.class)+"]";
}
@RestMethod(name=POST,path="/post1")
代码示例来源:origin: apache/juneau
@RestMethod(name=POST,path="/post1")
public String post1(RestRequest req, @Query(name="p1") String p1) throws Exception {
RequestQuery q = req.getQuery();
return "p1=["+p1+","+req.getQuery().getString("p1")+","+q.get("p1", String.class)+"]";
}
@RestMethod(name=POST,path="/post2")
代码示例来源:origin: apache/juneau
@RestMethod(name=POST,path="/post2")
public String post2(RestRequest req, @Query(name="p1",format="uon") String p1) throws Exception {
RequestQuery q = req.getQuery();
return "p1=["+p1+","+req.getQuery().getString("p1")+","+q.get("p1", String.class)+"]";
}
}
代码示例来源:origin: apache/juneau
@Body
@Response
@ResponseHeader
@X
public static class A01 {
@Query @Header @FormData @Path @Schema
public int f1;
}
内容来源于网络,如有侵权,请联系作者删除!