org.wu.framework.web.spring.EasyRequestBodyParam Maven / Gradle / Ivy
package org.wu.framework.web.spring;
import org.wu.framework.core.annotation.AliasFor;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* describe : 从请求body中获取指定的参数(List 数据无法解析、仅适用于Bean含有属性的数据) 用于获取前端传递多个参数到body中后段节省dto或者vo
*
* @author : Jia wei Wu
* @version 1.0
* @date : 2022/10/4 21:01
*/
@Target(ElementType.PARAMETER) // 可用在方法的参数上
@Retention(RetentionPolicy.RUNTIME) // 运行时有效
public @interface EasyRequestBodyParam {
/**
* Alias for {@link #name}.
*/
@AliasFor("name")
String value() default "";
/**
* The name of the part in the {@code "multipart/form-data"} request to bind to.
*
* @since 4.2
*/
@AliasFor("value")
String name() default "";
/**
* Whether the part is required.
* Defaults to {@code true}, leading to an exception being thrown
* if the part is missing in the request. Switch this to
* {@code false} if you prefer a {@code null} value if the part is
* not present in the request.
*/
boolean required() default true;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy