上一页 1 ··· 42 43 44 45 46 47 48 49 50 ··· 121 下一页
摘要: 概述 我们知道,Spring BeanValidation可以用来校验我们客户的提交的参数对应的Bean对象。但是在很多情况,我们的参数只有一个简单字符串或者是数字型参数(采用@RequestParam注解),要想使用SpringValidation还需要把这简单的参数包装成对象,甚是麻烦。下面我们 阅读全文
posted @ 2020-10-09 22:01 与f 阅读(2106) 评论(0) 推荐(0)
摘要: 1.0 @Valid @Valid注解用于校验,所属的包: javax.validation.Valid. 你可以定义实体,在实体的属性上添加校验规则,在API接收数据时添加@Valid注解,这时你的实体将会开启一个校验的功能。 ## 空检查 @NotEmpty:用在集合类上面;不能为null,而且 阅读全文
posted @ 2020-10-09 11:40 与f 阅读(1070) 评论(0) 推荐(0)
摘要: JSR 303、JSR 349与Bean Validator 笼统来说,就是Java规定了一套关于验证器的API,规范先后发了两版,就是所谓的JSR 303与JSR 349。然后提出了基于规范的实现:Bean Validator。JSR 303是最早的,其对应了Bean Validator 1.0的 阅读全文
posted @ 2020-10-09 10:04 与f 阅读(471) 评论(0) 推荐(0)
摘要: 1.maven 引入 <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-validator</artifactId> <version>4.0.1.GA</version> </dependency> <depen 阅读全文
posted @ 2020-10-09 09:40 与f 阅读(1723) 评论(0) 推荐(0)
摘要: 1、静态赋值 <img class="imgs-coat" v-for="(item,index) in coatImgs" :key="item.coatImg" :src="item.coatImg" alt="" data-item="123" @click="chooseCoat($even 阅读全文
posted @ 2020-09-28 09:35 与f 阅读(3635) 评论(0) 推荐(0)
摘要: Tomcat配置SSL安全证书 完全按照 aliyun的教程即可: https://help.aliyun.com/document_detail/98576.html https://help.aliyun.com/document_detail/102939.html 我的服务器是centos7 阅读全文
posted @ 2020-09-27 10:05 与f 阅读(740) 评论(0) 推荐(0)
摘要: 1、以实体类方式接收 @Controller @RequestMapping("/user") public class UserAction { @RequestMapping(value = "/add") @ResponseBody public String add(@RequestBody 阅读全文
posted @ 2020-09-23 15:08 与f 阅读(1153) 评论(0) 推荐(0)
摘要: public static void main(String[] args) { Map<String, String> map = new HashMap<String, String>(); map.put("1", "value1"); map.put("2", "value2"); map. 阅读全文
posted @ 2020-09-23 15:03 与f 阅读(473) 评论(0) 推荐(0)
摘要: 方法一: <div id="app"> <button @click="getData($event,'100')">点我</button> </div> methods : { getData(e,num) { console.log(num); // 输出 100 } } 方法二: <div i 阅读全文
posted @ 2020-09-21 08:54 与f 阅读(3666) 评论(0) 推荐(0)
摘要: let arr = [ [1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12], ]; function cartesianProductOf() { return Array.prototype.reduce.call(arguments, function(a 阅读全文
posted @ 2020-09-20 19:27 与f 阅读(2015) 评论(0) 推荐(0)
上一页 1 ··· 42 43 44 45 46 47 48 49 50 ··· 121 下一页