admin 管理员组文章数量: 1086019
2024年2月28日发(作者:爬虫python案例)
32. else if (ance(paramAnn)) {
33. RequestHeader requestHeader = (RequestHeader) paramAnn;
34. headerName = ();
35. required = ed();
36. defaultValue = parseDefaultValueAttribute(tValue());
37. annotationsFound++;
38. }
39. else if (ance(paramAnn)) {
40. requestBodyFound = true;
41. annotationsFound++;
42. }
43. else if (ance(paramAnn)) {
44. CookieValue cookieValue = (CookieValue) paramAnn;
45. cookieName = ();
46. required = ed();
47. defaultValue = parseDefaultValueAttribute(tValue());
48. annotationsFound++;
49. }
50. else if (ance(paramAnn)) {
51. PathVariable pathVar = (PathVariable) paramAnn;
52. pathVarName = ();
53. annotationsFound++;
54. }
55. else if (ance(paramAnn)) {
56. ModelAttribute attr = (ModelAttribute) paramAnn;
57. attrName = ();
58. annotationsFound++;
59. }
60. else if (ance(paramAnn)) {
61. defaultValue = ((Value) paramAnn).value();
62. }
63. else if (tionType().getSimpleName().startsWith("Valid")) {
64. validate = true;
65. Object value = ue(paramAnn);
66. validationHints = (value instanceof Object[] ? (Object[]) value : new Object[] {value});
67. }
68. }
69.
70. if (annotationsFound > 1) {
71. throw new IllegalStateException("Handler parameter annotations are exclusive choices - " +
72. "do not specify more than one such annotation on the same parameter: " + handlerMethod);
73. }
74.
75. if (annotationsFound == 0) {// 若没有发现注解
版权声明:本文标题:@RequestParam@RequestBody@PathVariable等参数绑定注解详解 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://roclinux.cn/b/1709078949a537886.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论