weinihaom commented on issue #3354:
URL: 
https://github.com/apache/servicecomb-java-chassis/issues/3354#issuecomment-1298106157

   > `@requestbody注解,就已经包含了非空的意思` 这个直观理解上不是很对。 body 参数还是允许传空。
   
   @Target(ElementType.PARAMETER)
   @Retention(RetentionPolicy.RUNTIME)
   @Documented
   public @interface RequestBody {
   
        /**
         * Whether body content is required.
         * <p>Default is {@code true}, leading to an exception thrown in case
         * there is no body content. Switch this to {@code false} if you prefer
         * {@code null} to be passed when the body content is {@code null}.
         * @since 3.2
         */
        boolean required() default true;
   }
   您看一下这个required(), 这个标明了请求体是否可以为空


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to