随笔分类 -  JAVA

摘要:错误描述:启动没问题无报错 访问URL信息如下: Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as a fallback. Tue Oct 26 0 阅读全文
posted @ 2021-10-26 09:43 zhangjunlong 阅读(2983) 评论(0) 推荐(0)
摘要:isNotEmpty(str)等价于 str != null && str.length > 0 isNotBlank(str) 等价于 str != null && str.length > 0 && str.trim().length > 0 isEmpty 等价于 str == null || 阅读全文
posted @ 2019-01-16 16:56 zhangjunlong 阅读(700) 评论(0) 推荐(0)
摘要:一、 Stream 的操作步骤 1. 创建 Stream 2. 中间操作 3. 终止操作 1. 创建 Stream //1. Collection 提供了两个方法 stream() 与 parallelStream() List<String> list = new ArrayList<>(); S 阅读全文
posted @ 2018-06-20 11:12 zhangjunlong 阅读(202) 评论(0) 推荐(0)
摘要:当要传递给Lambda体的操作,已经有实现的方法了,可以使用方法引用! (实现抽象方法的参数列表,必须与方法引用方法的参数列表保持一致!) 方法引用:使用操作符“::” 将方法名和对象或类的名字分隔开来。 如下三种主要使用情况: 对象::实例方法 类::静态方法 类::实例方法 阅读全文
posted @ 2018-06-12 18:26 zhangjunlong 阅读(142) 评论(0) 推荐(0)
摘要:一,lambda的基本语法 java8中引入了一个全新的操作符 "->" ,该操作符被称为箭头操作符或者Lambda操作符,箭头操作符把lambda表达式分为两部分: 左侧:Lambda表达式的参数列表 右侧:Lambda表达式所需要执行的功能或者成为Lambda体 语法格式一:无参数,无返回值 例 阅读全文
posted @ 2018-06-12 16:20 zhangjunlong 阅读(143) 评论(0) 推荐(0)