![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
java
whynote314
这个作者很懒,什么都没留下…
展开
-
JAVA8新特性 Stream流操作
概念Stream(流)是一个来自数据源的元素队列并支持聚合操作元素是特定类型的对象,形成一个队列。 Java中的Stream并不会存储元素,而是按需计算。数据源 流的来源。 可以是集合,数组,I/O channel, 产生器generator 等。聚合操作 类似SQL语句一样的操作, 比如filter, map, reduce, find, match, sorted等。和以前的Col...原创 2019-10-18 18:27:02 · 499 阅读 · 0 评论 -
获取工程绝对路径
System.out.println(this.getClass().getResource("")); //file:/D:/eclipse-workspace/nw-sim/target/classes/com/nsitd/sncp/cache/ System.out.println(this.getClass().getResource("/")); //file:/D:/ec...原创 2018-10-29 16:22:59 · 213 阅读 · 0 评论 -
Java按时间删除linux服务器上的文件
Java代码private void autoDeleteCdr(String cdrTimer) { Integer val = Integer.valueOf(cdrTimer) * 60; String delete = "find {0} -maxdepth 1 -type f -mmin +{1} -exec rm -f {2} \\;"; //将参数传入进去 dele...原创 2019-06-12 10:24:56 · 2309 阅读 · 0 评论 -
Gson @SerializedName与@Expose
@SerializedName@SerializedName(value = "name", alternate = { "userName" ,"myName"})private String name;value序列化后的名称,alternate用于反序列化,josn的key为"userName",“myName”或者"name" 都可以反序列化到对象的name属性上,但是如果jso...原创 2019-07-08 18:43:34 · 543 阅读 · 0 评论 -
SpringBoot接收ajax提交的List
前端代码var rules = [{securityTemplate: "111", type: "1", value: "111", message: "111"}]$.ajax({ type: "POST", contentType: 'application/json;', dataType: "json", url: "/security/onModify", data: J...原创 2019-06-24 20:13:56 · 2210 阅读 · 0 评论