1 Star 1 Fork 1

langyan1022/Spring-mvc Extends

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
RequestCustomParam.java 1.06 KB
一键复制 编辑 原始数据 按行查看 历史
langyan1022 提交于 2015-12-05 15:23 . s
import org.springframework.web.bind.annotation.ValueConstants;
import java.lang.annotation.*;
/**
* Created by Administrator on 2015/8/7.
*/
@Target(ElementType.PARAMETER)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface RequestCustomParam {
/**
* The name of the request parameter to bind to.
*/
String value() default "";
/**
* Whether the parameter is required.
* <p>Default is {@code true}, leading to an exception thrown in case
* of the parameter missing in the request. Switch this to {@code false}
* if you prefer a {@code null} in case of the parameter missing.
* <p>Alternatively, provide a {@link #defaultValue() defaultValue},
* which implicitly sets this flag to {@code false}.
*/
boolean required() default true;
/**
* The default value to use as a fallback when the request parameter value
* is not provided or empty. Supplying a default value implicitly sets
* {@link #required()} to false.
*/
String defaultValue() default ValueConstants.DEFAULT_NONE;
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/ly1022/Spring-mvc-Extends.git
[email protected]:ly1022/Spring-mvc-Extends.git
ly1022
Spring-mvc-Extends
Spring-mvc Extends
master

搜索帮助